Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(samsung_ac): Move error_code sensor to Diagnostics section in Home Assistant #244

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

omerfaruk-aran
Copy link
Owner

@omerfaruk-aran omerfaruk-aran commented Dec 28, 2024

📄 Description

What does this Pull Request do?

This pull request fixes an issue where the error_code sensor was not displayed under the Diagnostic section in Home Assistant. By updating the sensor schema and ensuring the entity_category is set to "diagnostic," the sensor now appears in the correct location.

  • 🐞 Bug Fix

✨ Key Changes

  1. Updated error_code_sensor_schema to include entity_category="diagnostic".
  2. Verified the sensor appears under the Diagnostic section after an ESPHome reload.
  3. Addressed issue [COMMON] move error codes to diagnostic section #237 by aligning the sensor's configuration with expected behavior.

🔗 Related Issues

Fixes: #237


Checklist

Please ensure the following before submitting your PR:

  • Code compiles without errors 🧑‍💻
  • All tests pass successfully ✅
  • Changes have been tested on relevant devices 🛠️
  • Documentation has been updated (if necessary) 📖
  • This PR is ready for review 🔍

🌐 Environment Information

🔢 Versions

  • ESPHome Version: 2024.12.2
  • Home Assistant Version: 2024.12.5

🧩 Devices

  • Air Conditioner Type:
    • NASA
    • NON-NASA
    • Other
  • Air Conditioner Model:
  • Outdoor Unit Model:
  • ESP Device Model: M5STACK ATOM Lite + M5STACK RS-485
  • Wiring Configuration: F1/F2

🧪 Test Plan

How were these changes tested?

  1. Applied the updated error_code_sensor_schema in the ESPHome configuration.
  2. Reloaded the ESPHome configuration from Home Assistant.
  3. Verified that the error_code sensor is now displayed in the Diagnostic section.

🔍 Logs

ESPHome Logs:

[17:15:23][C][sensor.error_code]: Error code sensor successfully initialized. 
[17:15:23][C][sensor.error_code]: Entity category: diagnostic

Home Assistant Logs:

2024-12-28 17:16:12 INFO: sensor.samsungac1_error_code moved to Diagnostic section.

🛠️ YAML Configuration

@omerfaruk-aran omerfaruk-aran added the enhancement New feature or request label Dec 28, 2024
@omerfaruk-aran omerfaruk-aran self-assigned this Dec 28, 2024
@omerfaruk-aran omerfaruk-aran merged commit b1e39fa into main Dec 28, 2024
4 checks passed
@omerfaruk-aran omerfaruk-aran deleted the fix/errorcode-diognostic branch December 28, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[COMMON] move error codes to diagnostic section
1 participant