petro
(Petro)
January 29, 2021, 7:57pm
21
I have no idea how you have your configuration.yaml set up, so I don’tknow how to answer that. Typically if you had a separate binary_sensor section, your include would look like this:
binary_sensor: !include binary_sensor.yaml
sensor: !include sensor.yaml
and then inside the file, you’d omit the section and just have the platforms.
binary_sensor.yaml
- platform: template
sensors:
my_first_binary_sensor:
...
my_second_binary_sensor:
...
sensor.yaml
- platform: template
sensors:
my_first_sensor:
...
my_second_sensor:
...
@petro
I don’t understand, I have a binary_sensor: !include binary_sensor.yaml
if I try to add:
sensor: !include binary_sensor_yaml I get a duplicate error.
where do I need to make a template normally like this then?
petro
(Petro)
January 30, 2021, 1:20am
23
Look at what I wrote and compare it to what you said. You’re including the same file in both areas, I’m not.
tom_l
January 30, 2021, 2:45am
24
Err…
petro:
Typically if you had a separate binary_sensor section, your include would look like this:
binary_sensor: !include binary_sensor.yaml
sensor: !include binary_sensor.yaml
sensor: !include binary_sensor.yam
l Should be:
sensor: !include sensor.yaml
1 Like
@petro
I got it working for now, the only thing is that I had to put the template in my Config… for some reason it won’t work when I separate it.
petro
(Petro)
January 30, 2021, 4:17pm
27
because you were probably adding a second field name, like you said earlier.
@petro
it’s correct know, first time I had a error, now did it over. whit sensor.yaml / !include sensor.yaml
1 Like
petro
(Petro)
January 30, 2021, 6:44pm
29
Nice, glad you got it working with includes.
1 Like
strange, it just stop working! I didn’t change anything, the sensors created by the utility_meter are not updating anymore… I checked everything, all is still the same.
the smart plug reports over Mqtt, the entity in HA is still reporting some kWh’s, only the extra sensors are not! anyone any idea?
this is the utility_meter:
utility_meter:
daily_energy_tv_wand:
source: sensor.tv_wand_plug_energy
cycle: daily
monthly_energy_tv_wand:
source: sensor.tv_wand_plug_energy
cycle: monthly
this is HA entity:
sensor.tv_wand_plug_energy
what Mqtt publish:
NFO: MQTT publish: topic 'zigbee2mqtt/tv wand plug', payload '{"consumption":5.33,"current":0.6682,"energy":1.27,"linkquality":11,"power":147.56,"state":"ON","temperature":21,"voltage":224}'
The problem is found, I updated zigbee2mqtt. That broke the energy state for my smart plug in not increasing the value anymore!
opened 08:10PM - 07 Jan 21 UTC
closed 08:25PM - 08 Jan 21 UTC
What happened
Prior to 1.17.0, the energy field of my Mi power plug ZigBee EU (ZNCZ04LM) increased as power was used by...
problem