Skip to content

Conversation

@abaddon
Copy link

@abaddon abaddon commented Dec 15, 2025

The weekly_schedule composite expose produces JSON that exceeds Home Assistant's 255 character state limit. This change:

  • Shows a human-readable summary in the state ("7 days configured")
  • Stores the full schedule data as entity attributes
  • Allows access to individual days via state_attr()

Fixes the truncated weekly_schedule sensor for Sonoff TRVZB and other TRV devices with schedule support.

Attached the outcome on Home Assistant
Screenshot 2025-12-16 at 21 38 04

@abaddon abaddon force-pushed the feature/weekly-schedule-json-attributes branch 2 times, most recently from ed26fac to bb6e876 Compare December 16, 2025 21:30
@abaddon
Copy link
Author

abaddon commented Dec 18, 2025

Hi @Koenkk , when you have time, I'm glad if you can review this fix to publish on HA correctly the weekly schedule value.
It's my first contribution and any feedback is more than welcome.

@Koenkk
Copy link
Owner

Koenkk commented Dec 18, 2025

This code is too specific for the TRVZ, e.g. another device might expose a weekly_schedule with completely different child properties. I would propose instead of using the single composite expose, expose 1 day per expose: https://github.com/Koenkk/zigbee-herdsman-converters/blob/0a939c0c19bd20e97ac5bda8a0ca3e85ad6d7db3/src/devices/sonoff.ts#L349

…nsor

The weekly_schedule composite expose produces JSON that exceeds
Home Assistant's 255 character state limit. This change:

- Shows a human-readable summary in the state ("7 days configured")
- Stores the full schedule data as entity attributes
- Allows access to individual days via state_attr()

Fixes the truncated weekly_schedule sensor for Sonoff TRVZB and
other TRV devices with schedule support.
@abaddon abaddon force-pushed the feature/weekly-schedule-json-attributes branch from b9e63b5 to 8a6756a Compare December 19, 2025 09:44
Create individual sensors for each day of the week instead of a single composite sensor with json_attributes. Only applies to SONOFF TRVZB.
@abaddon abaddon force-pushed the feature/weekly-schedule-json-attributes branch from d54670e to e5592b5 Compare December 19, 2025 11:06
@abaddon
Copy link
Author

abaddon commented Dec 19, 2025

Ok clear, thx for the feedback.
On HA you see now an attribute for each day like:

  • sensor.{device_id}_weekly_schedule_monday
  • sensor.{device_id}_weekly_schedule_tuesday
    etc..

Attached the output on HA
Screenshot 2025-12-19 at 10 38 26

Let me know if you have any other suggestion

@Koenkk
Copy link
Owner

Koenkk commented Dec 19, 2025

@abaddon
Copy link
Author

abaddon commented Dec 19, 2025

Ah ok, I created a new PR Koenkk/zigbee-herdsman-converters#11051 with the changes suggested.

@Koenkk Koenkk closed this Dec 21, 2025
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.

2 participants