Hi everyone,
I get this error:
“Invalid config for [binary_sensor]: required key not provided @ data[‘platform’]. Got None. (See ?, line ?).”
when checking the configuration, I don’t understand why I entered the “platform” value.
Here is an excerpt of my code:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
binary_sensor: !include_dir_list 485/
modbus:
name: waveshare1
type: tcp
host: 192.168.1.90
port: 4196
sensors:
#CONTECA 42
- name: MSB_heating_energy42
unique_id: MSB_heating_energy42
slave: 42
address: 2
precision: 2
unit_of_measurement: kWh
this is one of the binary_sensor:
binary_sensor:
- platform: template
sensors:
alarm_bit_1:
friendly_name: "ALARM Bit 1"
value_template: >
{% if states('sensor.Legiomix_alarms')|int|bitwise_and(1) > 0 %}
ATTIVO
{% else %}
non attivo
{% endif %}
alarm_bit_3:
friendly_name: "ALARM Bit 3"
value_template: >
{% if states('sensor.Legiomix_alarms')|int|bitwise_and(4) > 0 %}
ATTIVO
{% else %}
non attivo
{% endif %}
alarm_bit_4:
friendly_name: "ALARM Bit 4"
value_template: >
{% if states('sensor.Legiomix_alarms')|int|bitwise_and(8) > 0 %}
ATTIVO
{% else %}
non attivo
{% endif %}e