You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add missing translation strings for all translatable entities (#377)
* Add missing translation strings for all translatable entities
Add translation entries for sensor.state, binary_sensor.fault, and
switch.rain_delay. Also add translation_key to rain delay switch
description and fix _attr_name init order to prevent platform_data
resolution error.
* Add dynamic translation strings for zone and program entities
Use translation_placeholders for entities with dynamic names:
- sensor.zone_history: "{zone_name} zone history"
- switch.program: "{program_name} program"
- valve.zone: "{zone_name} zone"
Also add has_entity_name to BHyveZoneValve and BHyveZoneHistorySensor,
and avoid accessing self.name in base __init__ to prevent platform_data
resolution errors during entity construction.
* Remove unused args from create_program_switch_description test helper
* Set _attr_name as fallback for dynamic translation entities
HA falls back to device_class name (e.g. "Timestamp") when translation
placeholders can't be resolved at runtime. Set _attr_name explicitly
so the entity always has a readable name, while keeping translation_key
and translation_placeholders for proper i18n support.
* Fix duplicated device name in zone history and valve entities
Remove has_entity_name from BHyveZoneHistorySensor and BHyveZoneValve.
These entities include the zone name in their entity name, which gets
duplicated with the device name when has_entity_name is True. Since
translation_key requires has_entity_name, also remove the unused
translation_key and strings.json entries for these entities.
* Fix duplicated device name in zone entity names
When zone_name matches the device name (single-zone devices), use a
short entity name ("Zone", "Zone history") since has_entity_name already
prepends the device name. Multi-zone devices keep the zone name prefix
to distinguish between zones.
* Remove redundant program_name arg from BHyveProgramSwitch
Extract program name directly from the program dict in __init__ instead
of requiring it as a separate argument.
0 commit comments