Closed Kpapadak1 closed 4 weeks ago
I have some Wemos D1 Mini doing something else on my home assistant. And when i sterted with these devices i also noticed that the naming of the sensors can get tricky when using similar sensors on multiple devices. So to make naming (and the id's) a little bit easier to track and manage i prepend a room name and a friendly_name or name to the sensor i am defining.
See example of the wifi signal sensor. Each device that i configure like this will be easily located through room and friendlyname:
The naming of entities becomes very confusing when there is more than 1 EP1 device in HA.
Recommend using $name or ${name} in front of all switches and sensors. example below.
substitutions: name: "living-room-ep1-sensor" room: "living-room" friendly_name: "Everything Presence One" project_name: "Everything Smart Technologies.Everything Presence One" project_version: "1.0.3" temperature_offset: "-3"
esphome: name: "${name}" name_add_mac_suffix: False project: name: "${project_name}" version: "${project_version}"
esp32: board: esp32dev
logger:
api:
ota: password:
wifi: ssid: password:
captive_portal:
improv_serial:
esp32_improv: authorizer: none
dashboard_import: package_import_url: github://everythingsmarthome/presence-one/everything-presence-one.yaml@main import_full_config: false
light:
i2c: sda: 26 scl: 25 scan: true
sensor:
binary_sensor:
switch:
platform: safe_mode internal: false name: $name Safe Mode
platform: template name: "${name} mmWave Sensor" id: "mmwave_sensor" optimistic: true restore_state: true assumed_state: true turn_on_action:
platform: template name: "${name} mmWave LED" id: "mmwave_led" optimistic: true restore_state: true assumed_state: true turn_on_action:
platform: template name: "${name} uart_presence_output" id: "uart_presence_output" optimistic: true restore_state: true assumed_state: true turn_on_action:
platform: template name: "${name} uart_target_output" id: "uart_target_output" optimistic: true restore_state: true assumed_state: false turn_on_action:
number:
platform: template name: $name mmWave Distance id: mmwave_distance min_value: 0 max_value: 800 initial_value: 315 optimistic: true step: 15 restore_value: true unit_of_measurement: cm mode: box set_action:
platform: template name: $name mmWave Off Latency id: mmwave_latency min_value: 0 max_value: 65000 initial_value: 12500 optimistic: true step: 25 restore_value: true unit_of_measurement: ms mode: box set_action:
platform: template name: $name mmWave Sensitivity id: mmwave_sensitivity min_value: 0 max_value: 9 initial_value: 7 optimistic: true step: 1 restore_value: true set_action:
button:
platform: restart name: Restart $name
platform: template name: "${name} Factory Reset mmWave" id: "factory_reset_mmwave" on_press: