I have an ha-floorplan SVG file with many elements matching the names of entities in HA for my solar panel array. I would like to define just one state_action to set the value for power, and eventually other data types, on all matching elements.
I tried various regex-like patterns for the entity, for example:
rules:
- entity: sensor.hoymiles_pv_*pv_power
state_action:
action: call-service
service: floorplan.text_set
service_data:
text: '${entity.state ? entity.state + "W" : "—"}'
- entity: sensor.hoymiles_pv_1164a01504de_pv_1_temperature
state_action:
action: call-service
service: floorplan.text_set
service_data:
text: '${entity.state ? entity.state + "C" : "—"}'
but have not succeeded. The temperature rule works fine.
HA is giving the error
cannot find sensor.hoymiles_pv_*pv_power in Home Assistant entities.
I tried:
sensor.hoymiles_pv_*pv_power
sensor.hoymiles_pv_.*pv_power
sensor.hoymiles_pv_\S+pv_power
An example of an existing entity is sensor.hoymiles_pv_1164a0150401_pv_4_pv_power