Skip to content

[codex] Publish LG climate action status#171

Closed
joeblack2k wants to merge 1 commit into
JanM321:mainfrom
joeblack2k:codex/climate-action-status
Closed

[codex] Publish LG climate action status#171
joeblack2k wants to merge 1 commit into
JanM321:mainfrom
joeblack2k:codex/climate-action-status

Conversation

@joeblack2k

Copy link
Copy Markdown

Summary

Publishes the ESPHome climate action field so Home Assistant can show whether the LG unit is currently cooling, heating, drying, fan-only, idle, defrosting, or off.

Fix Log

  • Investigated issue Feature Request - Set "Action" Attribute #94 and the current LG status message handling.
  • Used the existing outdoor-unit status bit as the conditioning/idle signal.
  • Maps climate modes to Home Assistant actions:
    • off -> CLIMATE_ACTION_OFF
    • fan-only -> CLIMATE_ACTION_FAN
    • cool with outdoor unit active -> CLIMATE_ACTION_COOLING
    • dry with outdoor unit active -> CLIMATE_ACTION_DRYING
    • heat with outdoor unit active -> CLIMATE_ACTION_HEATING
    • heat/cool with outdoor unit active -> cooling/heating based on the temperature mode flags reported by the unit
    • powered on without outdoor activity -> CLIMATE_ACTION_IDLE
    • defrost bit set -> CLIMATE_ACTION_DEFROSTING
  • Updates action even when a received status message is otherwise ignored because a local send/change is pending. This keeps the UI action responsive without overwriting pending settings.
  • Immediately sets the action to off/fan/idle for local Home Assistant mode changes where possible, then lets the next unit status refine it.

Notes

The action is intentionally derived from data the component already receives. It does not change the LG bus protocol or add new commands.

Validation

  • git diff --check
  • uvx esphome config template.yaml
  • uvx esphome compile template.yaml

Fixes #94.

@kchen

kchen commented May 31, 2026

Copy link
Copy Markdown

It looks like this doesn't include using the preheating flag (as discussed in #94) to account for multiple indoor units having different heating vs idle states.

@joeblack2k

Copy link
Copy Markdown
Author

Superseded by the combined draft PR:

#172

I also carried over the review feedback from this thread: the new branch treats the preheat bit as an idle override when deriving climate action, so multi-split setups are handled more accurately than the original #171 logic.

@joeblack2k

Copy link
Copy Markdown
Author

Closing this draft in favor of the combined status/telemetry PR #172. The replacement includes the climate action work, the preheat fix from review feedback, error-code precision, and AE.80/CE.80 passive telemetry sensors.

@joeblack2k joeblack2k closed this Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request - Set "Action" Attribute

2 participants