I’ve stuffed this into a yaml file under /config/packages and get the below error
Package front_door_sensor setup failed. Component front_door_sensor Integration ‘front_door_sensor’ not found.
front_door_sensor:
sensor:
- platform: template
sensors:
front_door_sensor_battery:
friendly_name: "Front Door Sensor Battery"
value_template: "{% if states.zwave.front_door_sensor %}
{{ states.zwave.front_door_sensor.attributes.battery_level }}
{% else %}
unknown
{% endif %}"
unit_of_measurement: '%'
# entity_id: zwave.front_door_sensor
icon_template: >-
{% set battery_level = states('sensor.front_door_sensor_battery')|int('unknown') %}
{% set battery_round = (battery_level|int / 10)|int * 10 %}
{% if battery_level == 'unknown' %}
mdi:battery-unknown
{% else %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
{% endif %}
binary_sensor:
- platform: template
sensors:
front_door_sensor_contact:
value_template: "{{ is_state('sensor.front_door_sensor_access_control', '22') }}"
friendly_name: "front Door"
device_class: door
# entity_id: sensor.front_door_sensor_access_control
front_door_sensor_tamper:
value_template: "{{ is_state('sensor.front_door_sensor_burglar', '3') }}"
friendly_name: "front Door Sensor Tamper"
device_class: safety
# entity_id: sensor.front_door_sensor_burglar
homeassistant:
customize:
sensor.front_door_sensor_access_control:
hidden: true
sensor.front_door_sensor_alarm_level:
hidden: true
sensor.front_door_sensor_alarm_type:
hidden: true
sensor.front_door_sensor_burglar:
hidden: true
sensor.front_door_sensor_clock:
hidden: true
sensor.front_door_sensor_sourcenodeid:
hidden: true
binary_sensor.front_door_sensor_sensor:
hidden: true
sensor.front_door_sensor_system:
hidden: true
sensor.front_door_sensor_emergency:
hidden: true
sensor.front_door_sensor_power_management:
hidden: true
sensor.front_door_sensor_homehealth:
hidden: true
group:
front_door_sensor:
name: front Door Sensor
control: hidden
entities:
- binary_sensor.front_door_sensor_contact
- binary_sensor.front_door_sensor_tamper
- sensor.front_door_sensor_battery