Skip to content

fix: expose service response in HA Actions UI for get_smart_meter_readings and export_smart_meter_csv - #87

Merged
thecem merged 2 commits into
mainfrom
copilot/update-octopus-germany-service-responses
Jun 10, 2026
Merged

fix: expose service response in HA Actions UI for get_smart_meter_readings and export_smart_meter_csv#87
thecem merged 2 commits into
mainfrom
copilot/update-octopus-germany-service-responses

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Both service handlers returned a dict but were registered without supports_response, so Home Assistant silently discarded the return value — the Actions UI showed nothing, only the fired event carried the data.

Changes

  • __init__.py — import SupportsResponse from homeassistant.core; register both response-returning services with supports_response=SupportsResponse.ONLY:
hass.services.async_register(
    DOMAIN,
    SERVICE_GET_SMART_METER_READINGS,
    handle_get_smart_meter_readings,
    supports_response=SupportsResponse.ONLY,
)
hass.services.async_register(
    DOMAIN,
    SERVICE_EXPORT_SMART_METER_CSV,
    handle_export_smart_meter_csv,
    supports_response=SupportsResponse.ONLY,
)
  • services.yaml — updated export_smart_meter_csv description to document the service response (matching the existing wording on get_smart_meter_readings).
  • manifest.json — version bump 0.0.950.0.96.
  • RELEASE_NOTES.md — added v0.0.96 entry.

Existing fired events (octopus_germany_smart_meter_readings_result, octopus_germany_csv_export_result) and all validation/error paths are unchanged.

Copilot AI changed the title [WIP] Update octopus_germany service to support Actions UI response fix: expose service response in HA Actions UI for get_smart_meter_readings and export_smart_meter_csv Jun 10, 2026
Copilot AI requested a review from thecem June 10, 2026 11:10
@thecem
thecem marked this pull request as ready for review June 10, 2026 11:13
@thecem
thecem merged commit 213bdb0 into main Jun 10, 2026
6 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants