diff --git a/common/binary_sensor/status.yaml b/common/binary_sensor/status.yaml index 532bb6e..3ae8e46 100644 --- a/common/binary_sensor/status.yaml +++ b/common/binary_sensor/status.yaml @@ -1,3 +1,3 @@ --- platform: status -name: "${name} Status" +name: Status diff --git a/common/button/factory_reset.yaml b/common/button/factory_reset.yaml index 645d026..cb4ca65 100644 --- a/common/button/factory_reset.yaml +++ b/common/button/factory_reset.yaml @@ -1,3 +1,3 @@ --- platform: factory_reset -name: ${name} Factory Defaults +name: Factory Defaults diff --git a/common/button/restart.yaml b/common/button/restart.yaml index c6280be..2fc1eeb 100644 --- a/common/button/restart.yaml +++ b/common/button/restart.yaml @@ -1,3 +1,3 @@ --- platform: restart -name: ${name} Restart +name: Restart diff --git a/common/button/safe_mode.yaml b/common/button/safe_mode.yaml index 502f430..ac6a232 100644 --- a/common/button/safe_mode.yaml +++ b/common/button/safe_mode.yaml @@ -1,3 +1,3 @@ --- platform: safe_mode -name: ${name} Restart (Safe Mode) +name: Restart (Safe Mode) diff --git a/common/button/shutdown.yaml b/common/button/shutdown.yaml index 1578f0f..3fa991c 100644 --- a/common/button/shutdown.yaml +++ b/common/button/shutdown.yaml @@ -1,3 +1,3 @@ --- platform: shutdown -name: ${name} Shutdown +name: Shutdown diff --git a/common/sensor/debug.yaml b/common/sensor/debug.yaml index a678534..8cd9b13 100644 --- a/common/sensor/debug.yaml +++ b/common/sensor/debug.yaml @@ -1,10 +1,10 @@ --- platform: debug free: - name: "${name} Heap Free" + name: Heap Free fragmentation: - name: "${name} Heap Fragmentation" + name: Heap Fragmentation block: - name: "${name} Heap Max Block" + name: Heap Max Block loop_time: - name: "${name} Loop Time" + name: Loop Time diff --git a/common/sensor/free_heap.yaml b/common/sensor/free_heap.yaml index 8412ba8..ab8ff2e 100644 --- a/common/sensor/free_heap.yaml +++ b/common/sensor/free_heap.yaml @@ -1,6 +1,6 @@ --- platform: template -name: ${name} Free heap +name: Free heap lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL); icon: "mdi:memory" entity_category: diagnostic diff --git a/common/sensor/uptime.yaml b/common/sensor/uptime.yaml index b803372..29bc5dc 100644 --- a/common/sensor/uptime.yaml +++ b/common/sensor/uptime.yaml @@ -1,6 +1,6 @@ --- platform: uptime -name: ${name} Uptime +name: Uptime unit_of_measurement: "days" accuracy_decimals: 2 update_interval: 60s diff --git a/common/sensor/wifi_signal.yaml b/common/sensor/wifi_signal.yaml index 2b11c4f..636e045 100644 --- a/common/sensor/wifi_signal.yaml +++ b/common/sensor/wifi_signal.yaml @@ -1,4 +1,4 @@ --- platform: wifi_signal -name: "${name} WiFi Signal" +name: WiFi Signal update_interval: 60s diff --git a/common/switch/restart.yaml b/common/switch/restart.yaml index c6280be..2fc1eeb 100644 --- a/common/switch/restart.yaml +++ b/common/switch/restart.yaml @@ -1,3 +1,3 @@ --- platform: restart -name: ${name} Restart +name: Restart diff --git a/common/switch/safe_mode.yaml b/common/switch/safe_mode.yaml index 502f430..ac6a232 100644 --- a/common/switch/safe_mode.yaml +++ b/common/switch/safe_mode.yaml @@ -1,3 +1,3 @@ --- platform: safe_mode -name: ${name} Restart (Safe Mode) +name: Restart (Safe Mode) diff --git a/common/switch/shutdown.yaml b/common/switch/shutdown.yaml index 1578f0f..3fa991c 100644 --- a/common/switch/shutdown.yaml +++ b/common/switch/shutdown.yaml @@ -1,3 +1,3 @@ --- platform: shutdown -name: ${name} Shutdown +name: Shutdown diff --git a/common/text_sensor/debug.yaml b/common/text_sensor/debug.yaml index 1ccf13a..548e53f 100644 --- a/common/text_sensor/debug.yaml +++ b/common/text_sensor/debug.yaml @@ -1,6 +1,6 @@ --- platform: debug device: - name: "${name} Device Info" + name: Device Info reset_reason: - name: "${name} Reset Reason" + name: Reset Reason diff --git a/common/text_sensor/ethernet_info.yaml b/common/text_sensor/ethernet_info.yaml index bf7a054..060c392 100644 --- a/common/text_sensor/ethernet_info.yaml +++ b/common/text_sensor/ethernet_info.yaml @@ -1,8 +1,8 @@ --- platform: ethernet_info ip_address: - name: ${name} IP Address + name: IP Address address_1: - name: ${name} IP Address 1 + name: IP Address 1 address_2: - name: ${name} IP Address 2 \ No newline at end of file + name: IP Address 2 \ No newline at end of file diff --git a/common/text_sensor/git_ref.yaml b/common/text_sensor/git_ref.yaml index d782701..07cc7e6 100644 --- a/common/text_sensor/git_ref.yaml +++ b/common/text_sensor/git_ref.yaml @@ -1,6 +1,6 @@ --- platform: git_ref -name: "${name} Git Ref" +name: Git Ref long: true all: true abbrev: 16 diff --git a/common/text_sensor/uptime.yaml b/common/text_sensor/uptime.yaml index 05afce2..167da40 100644 --- a/common/text_sensor/uptime.yaml +++ b/common/text_sensor/uptime.yaml @@ -1,3 +1,3 @@ --- platform: uptime -name: ${name} Uptime \ No newline at end of file +name: Uptime \ No newline at end of file diff --git a/common/text_sensor/version.yaml b/common/text_sensor/version.yaml index 5c82d50..d36bac9 100644 --- a/common/text_sensor/version.yaml +++ b/common/text_sensor/version.yaml @@ -1,3 +1,3 @@ --- platform: version -name: "${name} Version" +name: Version diff --git a/common/text_sensor/wifi_info.yaml b/common/text_sensor/wifi_info.yaml index 1755c07..f3349e1 100644 --- a/common/text_sensor/wifi_info.yaml +++ b/common/text_sensor/wifi_info.yaml @@ -1,17 +1,19 @@ --- platform: wifi_info ip_address: - name: ${name} IP Address + name: IP Address icon: mdi:ip-network address_1: - name: ${name} IP Address 1 + name: IP Address 1 + icon: mdi:ip-network address_2: - name: ${name} IP Address 2 + name: IP Address 2 + icon: mdi:ip-network #ssid: -# name: ${name} SSID +# name: SSID #bssid: -# name: ${name} BSSID +# name: BSSID mac_address: - name: ${name} MAC + name: MAC #scan_results: -# name: ${name} Latest Scan Results +# name: Latest Scan Results diff --git a/mcu-air-office-r.yaml b/mcu-air-office-r.yaml index 58864bb..58b042d 100644 --- a/mcu-air-office-r.yaml +++ b/mcu-air-office-r.yaml @@ -1,12 +1,13 @@ substitutions: device: air-office-r - name: Office R Air Quality Monitor + name: Office R Air name_short: Office R area: Office R comment: "${area} | AirQ Monitoring" esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -52,7 +53,7 @@ uart: light: - platform: esp32_rmt_led_strip - # name: "${name} LED" + # name: LED id: neo rgb_order: GRB pin: 27 @@ -60,7 +61,7 @@ light: chipset: ws2812 restore_mode: ALWAYS_OFF - platform: esp32_rmt_led_strip - name: "${name} NEO" + name: NEO id: neo_strip rgb_order: GRB pin: 25 @@ -116,4 +117,4 @@ sensor: uart_id: particle_uart update_interval: 20s pm_2_5: - name: "${name_short} Particulate Matter 2.5µm Concentration" \ No newline at end of file + name: Particulate Matter 2.5µm Concentration \ No newline at end of file diff --git a/mcu-atoms3.yaml b/mcu-atoms3.yaml index 511120d..7d02af5 100644 --- a/mcu-atoms3.yaml +++ b/mcu-atoms3.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} platformio_options: @@ -56,7 +57,7 @@ web_server: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: neo rgb_order: GRB pin: 2 @@ -67,12 +68,12 @@ light: text: - platform: template - name: "${name} Test Text" + name: Test Text # id: "it_2" icon: "mdi:text" optimistic: true internal: false - initial_value: "Welcome ESPHOME" + initial_value: "Welcome ESPHOME - #{name}" restore_value: true mode: text # max_restore_data_length: 24 @@ -206,27 +207,27 @@ m5stack_4relay: switch: - platform: m5stack_4relay - name: ${name} Relay 1 + name: Relay 1 id: relay_1 channel: 1 # interlock: &interlock_group_1 [relay_1, relay_2] # interlock_wait_time: 1s m5stack_4relay_id: m5stack_relay_1 - platform: m5stack_4relay - name: ${name} Relay 2 + name: Relay 2 id: relay_2 channel: 2 # interlock: *interlock_group_1 # interlock_wait_time: 1s m5stack_4relay_id: m5stack_relay_1 - platform: m5stack_4relay - name: ${name} Relay 3 + name: elay 3 id: relay_3 channel: 3 # interlock: &interlock_group_2 [relay_3, relay_4] m5stack_4relay_id: m5stack_relay_1 - platform: m5stack_4relay - name: ${name} Relay 4 + name: Relay 4 id: relay_4 channel: 4 # interlock: *interlock_group_2 @@ -246,7 +247,7 @@ spi: binary_sensor: - platform: gpio - name: ${name} Button + name: Button pin: number: 41 inverted: true @@ -394,9 +395,9 @@ sensor: i2c_id: i2c_main address: 0x44 temperature: - name: "TEST Temperature" + name: TEST Temperature humidity: - name: "TEST Humidity" + name: TEST Humidity update_interval: 10s - platform: mpu6886 address: 0x68 @@ -414,7 +415,7 @@ sensor: # gyro_z: # name: "${name} MPU6886 Gyro z" temperature: - name: "${name} Temperature" + name: Temperature id: blabla - platform: homeassistant id: test_humidity @@ -437,22 +438,22 @@ sensor: # resolution: 12 - platform: dallas_temp address: 0xdb041750eae2ff28 - name: "${name} Dallas Temp 1" + name: Dallas Temp 1 one_wire_id: hub_1 update_interval: 10s - platform: dallas_temp address: 0xb2041750cf1aff28 - name: "${name} Dallas Temp 2" + name: Dallas Temp 2 one_wire_id: hub_1 update_interval: 30s - platform: dallas_temp address: 0xcd01191eb8b07128 - name: "${name} Dallas Temp 3" + name: Dallas Temp 3 one_wire_id: hub_1 update_interval: 45s - platform: dallas_temp address: 0x5a01191ef3375b28 - name: "${name} Dallas Temp 4" + name: Dallas Temp 4 one_wire_id: hub_1 time: diff --git a/mcu-basement-2.yaml b/mcu-basement-2.yaml index 44b0974..155d9bd 100644 --- a/mcu-basement-2.yaml +++ b/mcu-basement-2.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -31,12 +32,12 @@ status_led: light: - platform: binary - name: "${name_short} Light" + name: Light id: light_1 output: relay_1 restore_mode: ALWAYS_ON - platform: binary - name: "${name_short} Workbench Light" + name: Workbench Light id: light_2 output: relay_2 restore_mode: ALWAYS_ON diff --git a/mcu-basement.yaml b/mcu-basement.yaml index 25776e1..9308dd8 100644 --- a/mcu-basement.yaml +++ b/mcu-basement.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -36,7 +37,7 @@ binary_sensor: number: 0 mode: INPUT_PULLUP inverted: True - name: ${name} Light Switch + name: Light Switch device_class: light on_click: - min_length: 50ms @@ -45,7 +46,7 @@ binary_sensor: - homeassistant.service: service: light.toggle data: - entity_id: light.basement_light + entity_id: light.mcu_basement_2_light - min_length: 351ms max_length: 1000ms then: @@ -73,7 +74,7 @@ binary_sensor: number: 10 mode: INPUT_PULLUP inverted: true - name: ${name} Socket 1 Switch + name: Socket 1 Switch on_press: - switch.toggle: relay_2 - platform: gpio @@ -81,7 +82,7 @@ binary_sensor: number: 9 mode: INPUT_PULLUP inverted: true - name: ${name} Door + name: Door device_class: door filters: invert: @@ -89,11 +90,11 @@ binary_sensor: - homeassistant.service: service: light.turn_on data: - entity_id: light.basement_light + entity_id: light.mcu_basement_2_light select: - platform: template - name: "Sewage Treatment Blower" + name: Sewage Treatment Blower icon: mdi:hair-dryer-outline optimistic: true options: @@ -125,13 +126,13 @@ status_led: switch: - platform: gpio - name: "Sewage Treatment Blower" + name: Sewage Treatment Blower icon: mdi:hair-dryer-outline pin: 12 id: relay_1 restore_mode: ALWAYS_ON - platform: gpio - name: ${name} Socket 1 + name: Socket 1 icon: mdi:power-socket-fr pin: 5 id: relay_2 diff --git a/mcu-bedroom-lamp-left.yaml b/mcu-bedroom-lamp-left.yaml index 6f17ac7..d1c4b6a 100644 --- a/mcu-bedroom-lamp-left.yaml +++ b/mcu-bedroom-lamp-left.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -172,7 +173,7 @@ ota: light: - platform: xiaomi_bslamp2 id: my_light - name: ${name} + name: Light default_transition_length: ${default_transition_length} # When the brightness changes, update the front panel illumination. @@ -291,7 +292,7 @@ sensor: # The possible light modes are: "off", "rgb", "white" and "night". text_sensor: - platform: xiaomi_bslamp2 - # name: ${name} Light Mode + # name: Light Mode id: my_light_mode output: diff --git a/mcu-bedroom-lamp-right.yaml b/mcu-bedroom-lamp-right.yaml index 88924e7..97fb999 100644 --- a/mcu-bedroom-lamp-right.yaml +++ b/mcu-bedroom-lamp-right.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -169,7 +170,7 @@ ota: light: - platform: xiaomi_bslamp2 id: my_light - name: ${name} + name: Light default_transition_length: ${default_transition_length} # When the brightness changes, update the front panel illumination. @@ -272,7 +273,7 @@ sensor: # The possible light modes are: "off", "rgb", "white" and "night". text_sensor: - platform: xiaomi_bslamp2 - # name: ${name} Light Mode + # name: Light Mode id: my_light_mode output: diff --git a/mcu-c6-test-1.yaml b/mcu-c6-test-1.yaml index aa21be1..089dbc9 100644 --- a/mcu-c6-test-1.yaml +++ b/mcu-c6-test-1.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} # platformio_options: @@ -54,7 +55,7 @@ logger: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 8 diff --git a/mcu-c6-test-2.yaml b/mcu-c6-test-2.yaml index f3b49d6..107e51f 100644 --- a/mcu-c6-test-2.yaml +++ b/mcu-c6-test-2.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} # platformio_options: @@ -54,7 +55,7 @@ logger: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 8 diff --git a/mcu-cam-1.yaml b/mcu-cam-1.yaml index baa77d5..def6367 100644 --- a/mcu-cam-1.yaml +++ b/mcu-cam-1.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -27,7 +28,7 @@ packages: # components: [ esp32_camera ] esp32_camera: - name: My Camera + name: Camera external_clock: pin: 0 frequency: 20MHz @@ -45,7 +46,7 @@ switch: pin: 32 # restore_mode: ALWAYS_ON # id: "cam_power_down" - name: "${name} Enable CAM" + name: Enable # esp32_camera_web_server: # - port: 8080 diff --git a/mcu-can-node-1.yaml b/mcu-can-node-1.yaml index ec9c896..9ca6f56 100644 --- a/mcu-can-node-1.yaml +++ b/mcu-can-node-1.yaml @@ -2,10 +2,11 @@ substitutions: device: can-node-1 name: CAN Node 1 area: DEV - comment: "${area} | CANOpen" + comment: "${area} | CANopen" esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -13,8 +14,8 @@ esp32: board: esp32dev framework: type: esp-idf - # version: 5.3.1 - # platform_version: 6.9.0 + # version: 5.3.2 + # platform_version: 53.03.11 external_components: - source: github://mrk-its/esphome-canopen@dev @@ -79,16 +80,16 @@ canopen: binary_sensor: - platform: template id: light1_state - name: "Test Light 1 State" + name: Light 1 State - platform: template id: light2_state - name: "Test Light 2 State" + name: Light 2 State - platform: template id: light1_state_cmd - platform: gpio - name: "Boot Button" + name: Boot id: boot_button pin: number: 0 @@ -110,14 +111,14 @@ binary_sensor: sensor: - platform: template id: light1_brightness - name: "Test Light 1 Brightness" + name: Light 1 Brightness - platform: template id: light2_brightness - name: "Test Light 2 Brightness" + name: Light 2 Brightness switch: - platform: gpio - name: "Led" + name: LED id: blue_led internal: true pin: 2 diff --git a/mcu-can-node-2.yaml b/mcu-can-node-2.yaml index 114c680..3f27948 100644 --- a/mcu-can-node-2.yaml +++ b/mcu-can-node-2.yaml @@ -2,10 +2,11 @@ substitutions: device: can-node-2 name: CAN Node 2 area: DEV - comment: "${area} | CANOpen" + comment: "${area} | CANopen" esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -86,7 +87,7 @@ output: light: - platform: cwww id: light1 - name: "${name} Light 1" + name: Light 1 cold_white: cw_output1 warm_white: ww_output1 cold_white_color_temperature: 6536 K @@ -96,11 +97,42 @@ light: - platform: monochromatic id: light2 - name: "${name} Light 2" + name: Light 2 output: output2 default_transition_length: 0s - platform: binary id: light3 - name: "${name} Light 3" + name: Light 3 output: output3 + + +## LIGHTENING +i2c: + sda: 17 + scl: 18 + scan: true + # frequency: 100kHz + +as3935_i2c: + irq_pin: 19 + spike_rejection: 4 + +binary_sensor: + - platform: as3935 + name: Storm Alert + +sensor: + - platform: as3935 + lightning_energy: + name: Energy + distance: + name: Storm Distance + +# logger: +# level: VERY_VERBOSE +# logs: +# canbus: DEBUG +# canopen: DEBUG +# can_driver: DEBUG +# timer_driver: DEBUG diff --git a/mcu-cec-bedroom.yaml b/mcu-cec-bedroom.yaml index f03227b..d746efa 100644 --- a/mcu-cec-bedroom.yaml +++ b/mcu-cec-bedroom.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -66,7 +67,7 @@ binary_sensor: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 27 diff --git a/mcu-clock-1.yaml b/mcu-clock-1.yaml index 1b30dc0..83cb16d 100644 --- a/mcu-clock-1.yaml +++ b/mcu-clock-1.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} platformio_options: @@ -155,7 +156,7 @@ sensor: switch: - platform: template - name: "${name} Alarm" + name: Alarm optimistic: true turn_on_action: - globals.set: diff --git a/mcu-clock-living-room.yaml b/mcu-clock-living-room.yaml new file mode 100644 index 0000000..2cf0215 --- /dev/null +++ b/mcu-clock-living-room.yaml @@ -0,0 +1,173 @@ +substitutions: + device: clock-living-room + name: Living room Clock + area: Living Room / Kitchen + comment: "${area}: TV Rack Clock" + +esphome: + name: mcu-${device} + friendly_name: ${name} + area: ${area} + comment: ${comment} + +esp32: + board: m5stack-atom + framework: + type: esp-idf + # version: 5.3.2 + # platform_version: 53.03.12 + +external_components: + - source: + type: git + url: https://github.com/trip5/esphome-tm1650 + ref: main + refresh: 60s + components: [ tm1650 ] + +packages: + common: !include common/common.yaml + +# https://github.com/granadaxronos/120-SONG_NOKIA_RTTTL_RINGTONE_PLAYER_FOR_ARDUINO_UNO/blob/master/RTTTL_PLAYER/songs.h +api: + services: + - service: play_rtttl + variables: + song: string + then: + - rtttl.play: + rtttl: !lambda 'return song;' + +i2c: + id: i2c_main + sda: 32 + scl: 33 + scan: true #false + frequency: 100kHz + +globals: + - id: alarm_id + type: bool + restore_value: no + initial_value: "false" + +time: + - platform: homeassistant + id: ha_time + timezone: Europe/Bratislava + +binary_sensor: + - platform: gpio + name: Button + pin: + number: 39 + inverted: true + +display: + - platform: tm1650 + id: tm1650_display + i2c_id: i2c_main + # clk_pin: 4 + # dio_pin: 5 + update_interval: 500ms + # intensity: 0 + lambda: |- + static int i = 0; + i++; + if (id(alarm_id)) { + if ((i % 2) == 0) + it.print("8 8 "); + else + it.print(" 8 8"); + } else { + if (((i / 10) % 2) == 0) { + //it.set_intensity(7); + if ((i % 2) == 0) + it.strftime("%H.%M", id(ha_time).now()); + else + it.strftime("%H%M", id(ha_time).now()); + } else { + //it.set_intensity(1); + it.printf("%.0f~C", id(temperature).state); + } + } + +light: + - platform: esp32_rmt_led_strip + name: LED + id: led + rgb_order: GRB + pin: 27 + num_leds: 1 + chipset: ws2812 + restore_mode: ALWAYS_OFF + effects: + # Use default parameters: + - random: + # Customize parameters + - random: + name: "My Slow Random Effect" + transition_length: 30s + update_interval: 30s + - random: + name: "My Fast Random Effect" + transition_length: 4s + update_interval: 5s + - strobe: + - strobe: + name: Strobe Effect With Custom Values + colors: + - state: True + brightness: 100% + red: 100% + green: 90% + blue: 0% + duration: 500ms + - state: False + duration: 250ms + - state: True + brightness: 100% + red: 0% + green: 100% + blue: 0% + duration: 500ms + - flicker: + - flicker: + name: Flicker Effect With Custom Values + alpha: 95% + intensity: 1.5% + - addressable_rainbow: + - addressable_rainbow: + name: Rainbow Effect With Custom Values + speed: 10 + width: 50 + - addressable_scan: + - addressable_scan: + name: Scan Effect With Custom Values + move_interval: 100ms + +output: + - platform: ledc + pin: 25 + id: rtttl_out + +rtttl: + output: rtttl_out + +sensor: + - platform: homeassistant + id: temperature + entity_id: sensor.zigbee_outside_temperature + +switch: + - platform: template + name: Alarm + optimistic: true + turn_on_action: + - globals.set: + id: alarm_id + value: 'true' + turn_off_action: + - globals.set: + id: alarm_id + value: 'false' diff --git a/mcu-desk-lamp.yaml b/mcu-desk-lamp.yaml index 7f3f9d6..403026c 100644 --- a/mcu-desk-lamp.yaml +++ b/mcu-desk-lamp.yaml @@ -1,11 +1,12 @@ substitutions: device: desk-lamp - name: Mi Desk Lamp + name: Desk Lamp area: Room comment: "${area} | Desk lamp" esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -49,7 +50,7 @@ binary_sensor: light: - platform: cwww - name: "${name} Light" + name: Light id: mi_desk_light gamma_correct: 1 default_transition_length: 100ms diff --git a/mcu-dimmer.yaml b/mcu-dimmer.yaml index ec3dd27..c2b5ffb 100644 --- a/mcu-dimmer.yaml +++ b/mcu-dimmer.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_loop: @@ -51,7 +52,7 @@ light: name: Exercise Room Fan default_transition_length: 10s - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 27 diff --git a/mcu-echo-1.yaml b/mcu-echo-1.yaml index 872f543..0541d41 100644 --- a/mcu-echo-1.yaml +++ b/mcu-echo-1.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -60,7 +61,7 @@ api: binary_sensor: - platform: gpio - name: ${name} Button + name: Button pin: number: 39 inverted: true @@ -77,7 +78,7 @@ light: # id: status_led_id # output: status_led_output - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: neo_buildin rgb_order: GRB pin: 27 diff --git a/mcu-echo.yaml b/mcu-echo.yaml index b9d1831..d9dfab3 100644 --- a/mcu-echo.yaml +++ b/mcu-echo.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -48,13 +49,13 @@ i2c: binary_sensor: # - platform: gpio - # name: ${name} On-Board Button + # name: On-Board Button # id: button_buildin # pin: # number: 39 # inverted: true - platform: gpio - name: ${name} Button + name: Button id: button_ext pin: number: 12 @@ -72,10 +73,10 @@ light: # pin: 27 # variant: WS2812 # num_leds: 1 - # name: "${name} On-Board LED" + # name: On-Board LED" # id: neo_buildin - platform: rgb - name: "${name} Light" + name: Light id: led_light red: led_red green: led_green @@ -130,7 +131,7 @@ speaker: media_player: - platform: speaker id: media_out - name: ${name} Player + name: Player media_pipeline: speaker: media_spk_resampling_input announcement_pipeline: diff --git a/mcu-eworkbench.yaml b/mcu-eworkbench.yaml index d8bd4c1..b14f526 100644 --- a/mcu-eworkbench.yaml +++ b/mcu-eworkbench.yaml @@ -5,6 +5,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} comment: ${comment} platformio_options: board_build.flash_mode: dio diff --git a/mcu-fireplace.yaml b/mcu-fireplace.yaml index 87aead2..54c368a 100644 --- a/mcu-fireplace.yaml +++ b/mcu-fireplace.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -78,12 +79,12 @@ pca9554: binary_sensor: - platform: gpio - name: "${name} Status Button" + name: Status Button filters: - invert: pin: 39 - platform: template - name: "${name} Fire" + name: Fire lambda: |- if (id(heating_fireplace_temperature).state > 37.5) { return true; @@ -91,7 +92,7 @@ binary_sensor: return false; } - platform: gpio - name: "${name} Pump" + name: Pump id: off_peak_status pin: pca9554: pca9554_module @@ -104,7 +105,7 @@ sensor: - platform: ds248x address: 0x6203168B32A7FF28 # index: 0 - name: "${name}" + name: Temperature id: 'heating_fireplace_temperature' # - platform: dht # pin: 14 diff --git a/mcu-gate.yaml b/mcu-gate.yaml index ba97725..faf752f 100644 --- a/mcu-gate.yaml +++ b/mcu-gate.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -39,12 +40,12 @@ packages: button: - platform: output - name: "${name} Open" + name: Open id: gate_open output: relay_1 duration: 200ms - platform: output - name: "${name} Close" + name: Close id: gate_close output: relay_2 duration: 200ms @@ -59,40 +60,40 @@ output: switch: - platform: template - name: "${name} Open" + name: Open turn_on_action: - button.press: gate_open - platform: template - name: "${name} Close" + name: Close turn_on_action: - button.press: gate_close - platform: template - name: "${name} Auto Open" + name: Auto Open id: auto_open optimistic: true restore_mode: RESTORE_DEFAULT_ON - platform: template - name: "${name} Auto Close" + name: Auto Close id: auto_close optimistic: true restore_mode: RESTORE_DEFAULT_ON - platform: template - name: "${name} Enable Auris" + name: Enable Auris id: enable_auris optimistic: true restore_mode: RESTORE_DEFAULT_ON - platform: template - name: "${name} Enable Yaris" + name: Enable Yaris id: enable_yaris optimistic: true restore_mode: RESTORE_DEFAULT_ON - platform: template - name: "${name} Enable Honda PCX125" + name: Enable Honda PCX125 id: enable_pcx125 optimistic: true restore_mode: RESTORE_DEFAULT_ON - platform: template - name: "${name} Enable Suzuki DL650" + name: Enable Suzuki DL650 id: enable_dl650 optimistic: true restore_mode: RESTORE_DEFAULT_ON @@ -275,7 +276,7 @@ binary_sensor: select: - platform: template - name: Gate + name: State id: gate_state options: - Open diff --git a/mcu-gateway.yaml b/mcu-gateway.yaml index 36435e6..20e538e 100644 --- a/mcu-gateway.yaml +++ b/mcu-gateway.yaml @@ -1,10 +1,13 @@ substitutions: device: gateway name: Gateway - comment: "DEV | BLE Proxy, Modbus" - + area: DEV + comment: "${area} | BLE Proxy, Modbus" + esphome: name: mcu-${device} + friendly_name: ${name} + area: ${area} comment: ${comment} esp32: @@ -72,10 +75,10 @@ i2c: # subnet: 255.255.255.0 -ethernet: +# ethernet: # use_address: 10.17.241.254 # use_address: 10.17.241.98 - use_address: mcu-gateway.local + # use_address: mcu-gateway.local uart: id: uart_modbus @@ -108,7 +111,7 @@ sensor: - platform: modbus_controller modbus_controller_id: modbus_temp_1 id: temp_1 - name: "${name} Temperature 1" + name: Temperature 1 address: 0 unit_of_measurement: "°C" register_type: read @@ -120,7 +123,7 @@ sensor: - platform: modbus_controller modbus_controller_id: modbus_temp_1 id: hum_1 - name: "${name} Humidity 1" + name: Humidity 1 address: 1 unit_of_measurement: "%" register_type: read @@ -131,7 +134,7 @@ sensor: - platform: modbus_controller modbus_controller_id: modbus_temp_2 id: temp_2 - name: "${name} Temperature 2" + name: Temperature 2 address: 0 unit_of_measurement: "°C" register_type: read @@ -143,7 +146,7 @@ sensor: - platform: modbus_controller modbus_controller_id: modbus_temp_2 id: hum_2 - name: "${name} Humidity 2" + name: Humidity 2 address: 1 unit_of_measurement: "%" register_type: read @@ -153,25 +156,25 @@ sensor: - multiply: 0.1 # - platform: bmp085 # temperature: - # name: "BMP180 Temperature" + # name: BMP180 Temperature # pressure: - # name: "BMP180 Pressure" + # name: BMP180 Pressure # address: 0x77 # update_interval: 60s # - platform: bme280 # temperature: - # name: "BME280 Temperature" + # name: BME280 Temperature # oversampling: 16x # pressure: - # name: "BME280 Pressure" + # name: BME280 Pressure # humidity: - # name: "BME280 Humidity" + # name: BME280 Humidity # address: 0x76 # update_interval: 60s - platform: modbus_controller modbus_controller_id: modbus_adc_1 id: adc_1_1 - name: "Solar Pressure" + name: Solar Pressure address: 0 unit_of_measurement: "MPa" register_type: holding @@ -186,7 +189,7 @@ sensor: switch: - platform: modbus_controller modbus_controller_id: modbus_adc_1 - name: "Readress MODBUS" + name: Readress MODBUS register_type: holding address: 0x00FD entity_category: config diff --git a/mcu-heating.yaml b/mcu-heating.yaml index a01c5b9..e3569c7 100644 --- a/mcu-heating.yaml +++ b/mcu-heating.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} diff --git a/mcu-kitchen.yaml b/mcu-kitchen.yaml index 32ad836..acde8e5 100644 --- a/mcu-kitchen.yaml +++ b/mcu-kitchen.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -85,14 +86,14 @@ pca9685: binary_sensor: - platform: gpio - name: "${name} Status Button" + name: Status Button filters: - invert: pin: 39 light: # - platform: esp32_rmt_led_strip - # name: "${name} Status Light" + # name: Status Light # id: neo # rgb_order: GRB # pin: 27 @@ -101,7 +102,7 @@ light: # chipset: ws2812 # restore_mode: ALWAYS_OFF - platform: cwww - name: "${name} Worktop Left" + name: Worktop Left id: light_1 default_transition_length: 200ms restore_mode: ALWAYS_ON @@ -110,7 +111,7 @@ light: cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K - platform: cwww - name: "${name} Stove" + name: Stove id: light_2 default_transition_length: 200ms restore_mode: ALWAYS_ON @@ -119,7 +120,7 @@ light: cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K - platform: cwww - name: "${name} Worktop Right" + name: Worktop Right id: light_3 default_transition_length: 200ms restore_mode: ALWAYS_ON @@ -128,7 +129,7 @@ light: cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K # - platform: cwww - # name: "${name} Light Spare" + # name: Light Spare # id: light_4 # default_transition_length: 200ms # restore_mode: ALWAYS_ON diff --git a/mcu-lightening.yaml b/mcu-lightening.yaml index cd7e899..fd2417d 100644 --- a/mcu-lightening.yaml +++ b/mcu-lightening.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -41,7 +42,7 @@ as3935_i2c: binary_sensor: # - platform: gpio -# # name: ${name} Button +# # name: Button # pin: # number: 39 # inverted: true @@ -50,7 +51,7 @@ binary_sensor: light: - platform: esp32_rmt_led_strip - # name: "${name} LED" + # name: LED id: neo rgb_order: GRB pin: 27 @@ -61,7 +62,7 @@ light: sensor: - platform: as3935 lightning_energy: - name: Lightning Energy + name: Energy distance: name: Storm Distance diff --git a/mcu-lvgl-eworkbench.yaml b/mcu-lvgl-eworkbench.yaml index 055d3a8..cfadd2b 100644 --- a/mcu-lvgl-eworkbench.yaml +++ b/mcu-lvgl-eworkbench.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} platformio_options: diff --git a/mcu-lvgl.yaml b/mcu-lvgl.yaml index 92534e1..7ec425e 100644 --- a/mcu-lvgl.yaml +++ b/mcu-lvgl.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} platformio_options: diff --git a/mcu-nspanel-bedroom.yaml b/mcu-nspanel-bedroom.yaml index acdf58d..f822628 100644 --- a/mcu-nspanel-bedroom.yaml +++ b/mcu-nspanel-bedroom.yaml @@ -11,6 +11,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -185,7 +186,7 @@ time: binary_sensor: - platform: gpio - name: ${name} Left Button + name: Left Button pin: number: 14 inverted: true @@ -197,14 +198,13 @@ binary_sensor: root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; - platform: gpio - name: ${name} Right Button + name: Right Button pin: number: 27 inverted: true # on_click: # - switch.toggle: relay_2 on_click: - - homeassistant.service: service: light.toggle data: @@ -216,7 +216,7 @@ binary_sensor: light: - platform: binary - name: ${name_short} Light + name: Light id: light_1 output: relay_1 @@ -236,7 +236,7 @@ output: switch: - platform: gpio - name: ${name} Screen Power + name: Screen Power id: screen_power entity_category: config pin: @@ -268,7 +268,7 @@ sensor: b_constant: 3950 reference_temperature: 25°C reference_resistance: 10kOhm - name: "${name_short} Temperature" + name: Temperature - platform: template id: room_temperature_id diff --git a/mcu-nspanel-dev.yaml b/mcu-nspanel-dev.yaml index e561da4..bdef8b1 100644 --- a/mcu-nspanel-dev.yaml +++ b/mcu-nspanel-dev.yaml @@ -1,7 +1,6 @@ substitutions: device: nspanel-dev name: NSPanel DEV - name_short: DevPanel area: DEV comment: "${area} | NSPanel" panel_recv_topic: "tele/${device}/RESULT" @@ -10,6 +9,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -424,7 +424,7 @@ time: binary_sensor: - platform: gpio - name: ${name} Left Button + name: Left Button pin: number: 14 inverted: true @@ -436,7 +436,7 @@ binary_sensor: # entity_id: switch.gate_open - platform: gpio - name: ${name} Right Button + name: Right Button pin: number: 27 inverted: true @@ -455,7 +455,7 @@ output: switch: - platform: gpio - name: ${name} Relay 1 + name: Relay 1 id: relay_1 pin: number: 22 @@ -470,7 +470,7 @@ switch: # payload: '{"CustomRecv":"event,sleepReached,cardGrid"}' - platform: gpio - name: ${name} Relay 2 + name: Relay 2 id: relay_2 pin: number: 19 @@ -485,7 +485,7 @@ switch: # Turn screen power on/off. Easy way to configure the screen power control, but this should not be used from HA, as all components must be re-initialized afterwards. For lights, names of lights etc. this practically means that the state must change once to happen. - platform: gpio - name: ${name} Screen Power + name: Screen Power id: screen_power entity_category: config pin: @@ -517,7 +517,7 @@ sensor: b_constant: 3950 reference_temperature: 25°C reference_resistance: 10kOhm - name: "Living Room Temperature Entry" + name: Living Room Temperature Entry - platform: template id: room_temperature_id diff --git a/mcu-nspanel-fireplace.yaml b/mcu-nspanel-fireplace.yaml index 34a71a9..3b154f2 100644 --- a/mcu-nspanel-fireplace.yaml +++ b/mcu-nspanel-fireplace.yaml @@ -1,7 +1,6 @@ substitutions: device: nspanel-fireplace name: Fireplace NSPanel - name_short: Fireplace area: Living Room / Kitchen comment: "${area}, Fireplace | NSPanel" panel_recv_topic: "tele/${device}/RESULT" @@ -10,6 +9,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -184,7 +184,7 @@ time: binary_sensor: - platform: gpio - name: ${name} Left Button + name: Left Button pin: number: 14 inverted: true @@ -200,7 +200,7 @@ binary_sensor: root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; - platform: gpio - name: ${name} Right Button + name: Right Button pin: number: 27 inverted: true @@ -236,7 +236,7 @@ switch: number: 19 - platform: gpio - name: ${name} Screen Power + name: Screen Power id: screen_power entity_category: config pin: @@ -268,7 +268,7 @@ sensor: b_constant: 3950 reference_temperature: 25°C reference_resistance: 10kOhm - name: "Living Room Temperature Fireplace" + name: "Living Room Temperature" - platform: template id: room_temperature_id diff --git a/mcu-nspanel-office-j.yaml b/mcu-nspanel-office-j.yaml index 8d19361..1eac9da 100644 --- a/mcu-nspanel-office-j.yaml +++ b/mcu-nspanel-office-j.yaml @@ -1,7 +1,6 @@ substitutions: device: nspanel-office-j name: Office J NSPanel - name_short: Office J area: Office J comment: "${area} | NSPanel" panel_recv_topic: "tele/${device}/RESULT" @@ -11,6 +10,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -190,7 +190,7 @@ time: binary_sensor: # - platform: gpio - # name: ${name} Left Button + # name: Left Button # pin: # number: 14 # inverted: true @@ -198,7 +198,7 @@ binary_sensor: # - switch.toggle: relay_1 # - platform: gpio - # name: ${name} Right Button + # name: Right Button # pin: # number: 27 # inverted: true @@ -210,7 +210,7 @@ binary_sensor: # data: # entity_id: light.office_r_desk_strip - platform: gpio - name: ${name} Left Button + name: Left Button pin: number: 14 inverted: true @@ -222,7 +222,7 @@ binary_sensor: root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; - platform: gpio - name: ${name} Right Button + name: Right Button pin: number: 27 inverted: true @@ -252,16 +252,16 @@ output: light: - platform: binary - name: ${name_short} Light + name: Light id: light_1 output: relay_1 # # - platform: binary -# # name: ${name_full} Relay 2 +# # name: Relay 2 # # output: relay_2 switch: - platform: gpio - name: ${name} Screen Power + name: Screen Power id: screen_power entity_category: config pin: @@ -291,7 +291,7 @@ sensor: b_constant: 3950 reference_temperature: 22°C reference_resistance: 10kOhm - name: "${name_short} Temperature" + name: Temperature - platform: template id: room_temperature_id @@ -299,7 +299,7 @@ sensor: # text_sensor: # - platform: ble_scanner -# name: "${name_short} BLE Scanner" +# name: BLE Scanner # esp32_ble_beacon: # type: iBeacon diff --git a/mcu-nspanel-office-r.yaml b/mcu-nspanel-office-r.yaml index c12ff7f..c264e43 100644 --- a/mcu-nspanel-office-r.yaml +++ b/mcu-nspanel-office-r.yaml @@ -1,7 +1,6 @@ substitutions: device: nspanel-office-r name: Office R NSPanel - name_short: Office R area: Office R comment: "${area} | NSPanel" panel_recv_topic: "tele/${device}/RESULT" @@ -11,6 +10,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -196,7 +196,7 @@ time: binary_sensor: # - platform: gpio - # name: ${name} Left Button + # name: Left Button # pin: # number: 14 # inverted: true @@ -204,7 +204,7 @@ binary_sensor: # - switch.toggle: relay_1 # - platform: gpio - # name: ${name} Right Button + # name: Right Button # pin: # number: 27 # inverted: true @@ -216,7 +216,7 @@ binary_sensor: # data: # entity_id: light.office_r_desk_strip - platform: gpio - name: ${name} Left Button + name: Left Button pin: number: 14 inverted: true @@ -232,7 +232,7 @@ binary_sensor: # - lambda: 'id(nspanel_id).send_custom_command("event,buttonPress1,navigate.cardGrid_main,button");' - platform: gpio - name: ${name} Right Button + name: Right Button pin: number: 27 inverted: true @@ -260,7 +260,7 @@ output: light: - platform: esp32_rmt_led_strip - name: "${name_short} Presence Light" + name: Presence Light id: neo rgb_order: GRB pin: 23 @@ -278,26 +278,26 @@ light: transition_length: 2s # defaults to 1s update_interval: 2s - platform: binary - name: ${name_short} Light + name: Light id: light_1 output: relay_1 # # - platform: binary -# # name: ${name_full} Relay 2 +# # name: Relay 2 # # output: relay_2 switch: # - platform: gpio - # name: ${name_short} Light + # name: Light # id: relay_1 # pin: # number: 22 - platform: gpio - # name: ${name_full} Relay 2 + # name: Relay 2 id: relay_2 pin: number: 19 - platform: gpio - name: ${name} Screen Power + name: Screen Power id: screen_power entity_category: config pin: @@ -327,7 +327,7 @@ sensor: b_constant: 3950 reference_temperature: 22°C reference_resistance: 10kOhm - name: "${name_short} Temperature" + name: Temperature - platform: template id: room_temperature_id @@ -335,7 +335,7 @@ sensor: # text_sensor: # - platform: ble_scanner -# name: "${name_short} BLE Scanner" +# name: BLE Scanner # esp32_ble_beacon: # type: iBeacon diff --git a/mcu-nspanel-patio.yaml b/mcu-nspanel-patio.yaml index 8581343..78f84a5 100644 --- a/mcu-nspanel-patio.yaml +++ b/mcu-nspanel-patio.yaml @@ -1,7 +1,6 @@ substitutions: device: nspanel-patio name: Patio NSPanel - name_short: Patio area: Living Room / Kitchen comment: "${area}, Patio | NSPanel" panel_recv_topic: "tele/${device}/RESULT" @@ -10,6 +9,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -184,7 +184,7 @@ time: binary_sensor: - platform: gpio - name: ${name} Left Button + name: Left Button pin: number: 14 inverted: true @@ -196,7 +196,7 @@ binary_sensor: root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; - platform: gpio - name: ${name} Right Button + name: Right Button pin: number: 27 inverted: true @@ -208,7 +208,7 @@ binary_sensor: - homeassistant.service: service: light.toggle data: - entity_id: light.patio_light + entity_id: light.patio_lights - mqtt.publish_json: topic: $panel_recv_topic payload: |- @@ -230,7 +230,7 @@ switch: number: 22 - platform: gpio - name: ${name_short} Light MAIN + name: Light MAIN id: relay_2 restore_mode: always_on entity_category: config @@ -238,7 +238,7 @@ switch: number: 19 - platform: gpio - name: ${name} Screen Power + name: Screen Power id: screen_power entity_category: config pin: @@ -270,7 +270,7 @@ sensor: b_constant: 3950 reference_temperature: 25°C reference_resistance: 10kOhm - name: "Living Room Temperature" + name: Living Room Temperature - platform: template id: room_temperature_id diff --git a/mcu-office-r.yaml b/mcu-office-r.yaml index d451168..cca6e83 100644 --- a/mcu-office-r.yaml +++ b/mcu-office-r.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} platformio_options: diff --git a/mcu-patio.yaml b/mcu-patio.yaml index 94c011e..1c287fb 100644 --- a/mcu-patio.yaml +++ b/mcu-patio.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_boot: @@ -85,14 +86,14 @@ pca9685: binary_sensor: - platform: gpio - name: "${name} Status Button" + name: Status Button filters: - invert: pin: 39 light: # - platform: esp32_rmt_led_strip - # name: "${name} Status Light" + # name: Status Light # id: neo # rgb_order: GRB # pin: 27 @@ -101,7 +102,7 @@ light: # chipset: ws2812 # restore_mode: ALWAYS_OFF - platform: cwww - name: "${name} Light 1" + name: Light 1 id: light_1 default_transition_length: 200ms restore_mode: ALWAYS_ON @@ -110,7 +111,7 @@ light: cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K - platform: cwww - name: "${name} Light 2" + name: Light 2 id: light_2 default_transition_length: 200ms restore_mode: ALWAYS_ON @@ -119,7 +120,7 @@ light: cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K - platform: cwww - name: "${name} Light 3" + name: Light 3 id: light_3 default_transition_length: 200ms restore_mode: ALWAYS_ON @@ -128,7 +129,7 @@ light: cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K - platform: cwww - name: "${name} Light 4" + name: Light 4 id: light_4 default_transition_length: 200ms restore_mode: ALWAYS_ON @@ -201,6 +202,6 @@ power_supply: switch: - platform: gpio - name: "${name} Relay" + name: Relay id: relay_2 pin: 19 diff --git a/mcu-pow-1.yaml b/mcu-pow-1.yaml index 92fd9d0..a38324d 100644 --- a/mcu-pow-1.yaml +++ b/mcu-pow-1.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} comment: ${comment} on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state. priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle @@ -73,7 +74,7 @@ binary_sensor: publish_initial_state: true internal: true - platform: template - name: "${name} Load" + name: Load id: load_on lambda: |- if (isnan(id(w_sensor).state)) { @@ -128,17 +129,17 @@ output: sensor: - platform: cse7766 current: - name: "${name} Current" + name: Current id: a_sensor filters: - throttle_average: ${update_interval} voltage: - name: "${name} Voltage" + name: Voltage id: v_sensor filters: - throttle_average: ${update_interval} power: - name: "${name} Power" + name: Power id: w_sensor filters: - throttle_average: ${update_interval} @@ -150,27 +151,27 @@ sensor: then: - light.turn_off: switch_led energy: - name: "${name} Energy" + name: Energy id: wh_sensor filters: - throttle_average: ${update_interval} - platform: total_daily_energy - name: "${name} Total Daily Energy" + name: Total Daily Energy power_id: w_sensor filters: - multiply: 0.001 unit_of_measurement: kWh - platform: template - name: "${name} Power Factor" + name: Power Factor device_class: power_factor id: power_factor lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state; switch: - platform: template - name: "${name} Relay" + name: Relay optimistic: true id: relay_1 turn_off_action: diff --git a/mcu-pow-2.yaml b/mcu-pow-2.yaml index d25f1ae..7d6c887 100644 --- a/mcu-pow-2.yaml +++ b/mcu-pow-2.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} comment: ${comment} on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state. priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle @@ -73,7 +74,7 @@ binary_sensor: publish_initial_state: true internal: true - platform: template - name: "${name} Load" + name: Load id: load_on lambda: |- if (isnan(id(w_sensor).state)) { @@ -128,17 +129,17 @@ output: sensor: - platform: cse7766 current: - name: "${name} Current" + name: Current id: a_sensor filters: - throttle_average: ${update_interval} voltage: - name: "${name} Voltage" + name: Voltage id: v_sensor filters: - throttle_average: ${update_interval} power: - name: "${name} Power" + name: Power id: w_sensor filters: - throttle_average: ${update_interval} @@ -150,27 +151,27 @@ sensor: then: - light.turn_off: switch_led energy: - name: "${name} Energy" + name: Energy" id: wh_sensor filters: - throttle_average: ${update_interval} - platform: total_daily_energy - name: "${name} Total Daily Energy" + name: Total Daily Energy power_id: w_sensor filters: - multiply: 0.001 unit_of_measurement: kWh - platform: template - name: "${name} Power Factor" + name: Power Factor device_class: power_factor id: power_factor lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state; switch: - platform: template - name: "${name} Relay" + name: Relay optimistic: true id: relay_1 turn_off_action: diff --git a/mcu-rf433.yaml b/mcu-rf433.yaml index 7655eb7..fa13714 100644 --- a/mcu-rf433.yaml +++ b/mcu-rf433.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} diff --git a/mcu-shed.yaml b/mcu-shed.yaml index 5284efc..3df314d 100644 --- a/mcu-shed.yaml +++ b/mcu-shed.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -87,20 +88,20 @@ switch: mode: OUTPUT inverted: true - platform: gpio - name: "${name} Socket" + name: Socket id: socket_relay pin: pca9554: pca9554_module number: 4 mode: OUTPUT - platform: gpio - name: "Garden Light" + name: Garden Light id: garden_light_relay pin: number: 22 mode: OUTPUT - platform: gpio - name: "${name} Light" + name: Light id: shed_light_relay pin: number: 19 diff --git a/mcu-socket-01.yaml b/mcu-socket-01.yaml index 423de5b..dc58825 100644 --- a/mcu-socket-01.yaml +++ b/mcu-socket-01.yaml @@ -1,6 +1,5 @@ substitutions: device: socket-01 - device_id: socket_01 name: Socket 01 area: Bedroom comment: "${area} | TV Socket" @@ -9,6 +8,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -36,7 +36,7 @@ binary_sensor: number: GPIO13 mode: INPUT_PULLUP inverted: yes - name: "${name} Button" + name: Button # filters: # invert: on_press: @@ -65,11 +65,11 @@ output: light: - platform: binary - name: "${name} Red LED" + name: Red LED id: light_red output: led_red - platform: binary - name: "${name} Blue LED" + name: Blue LED id: light_blue output: led_blue @@ -83,21 +83,21 @@ sensor: current_resistor: ${current_res} voltage_divider: ${voltage_div} current: - name: "${name} Current" + name: Current icon: mdi:flash-circle accuracy_decimals: 3 voltage: - name: "${name} Voltage" + name: Voltage icon: mdi:current-ac power: - name: "${name} Power" - id: "${device_id}_power" + name: Power + id: power icon: mdi:flash-outline update_interval: 30s change_mode_every: 4 - platform: total_daily_energy - name: "${name} Total Daily Power" - power_id: "${device_id}_power" + name: Total Daily Power" + power_id: power filters: # Multiplication factor from W to kW is 0.001 - multiply: 0.001 @@ -106,7 +106,7 @@ sensor: switch: - platform: gpio - name: "${name} Relay" + name: Relay # icon: mdi:power-socket-eu pin: GPIO15 id: relay diff --git a/mcu-socket-02.yaml b/mcu-socket-02.yaml index 75e5ee9..a997e6d 100644 --- a/mcu-socket-02.yaml +++ b/mcu-socket-02.yaml @@ -9,6 +9,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -36,7 +37,7 @@ binary_sensor: number: GPIO13 mode: INPUT_PULLUP inverted: yes - name: "${name} Button" + name: Button # filters: # invert: on_press: @@ -56,11 +57,11 @@ binary_sensor: light: - platform: binary - name: "${name} Red LED" + name: Red LED id: light_red output: led_red - platform: binary - name: "${name} Blue LED" + name: Blue LED id: light_blue output: led_blue @@ -84,21 +85,21 @@ sensor: current_resistor: ${current_res} voltage_divider: ${voltage_div} current: - name: "${name} Current" + name: Current icon: mdi:flash-circle accuracy_decimals: 3 voltage: - name: "${name} Voltage" + name: Voltage icon: mdi:current-ac power: - name: "${name} Power" - id: "${device_id}_power" + name: Power + id: power icon: mdi:flash-outline update_interval: 30s change_mode_every: 4 - platform: total_daily_energy - name: "${name} Total Daily Power" - power_id: "${device_id}_power" + name: Total Daily Power + power_id: power filters: # Multiplication factor from W to kW is 0.001 - multiply: 0.001 @@ -112,7 +113,7 @@ sensor: switch: - platform: gpio - name: "${name} Relay" + name: Relay # icon: mdi:power-socket-eu pin: GPIO15 id: relay diff --git a/mcu-socket-03.yaml b/mcu-socket-03.yaml index efb59dd..e7a5e9a 100644 --- a/mcu-socket-03.yaml +++ b/mcu-socket-03.yaml @@ -1,6 +1,5 @@ substitutions: device: socket-03 - device_id: socket_03 name: Socket 03 area: Bedroom comment: "${area} | SPARE Socket" @@ -16,6 +15,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} esp8266: @@ -42,7 +42,7 @@ binary_sensor: number: GPIO13 mode: INPUT_PULLUP inverted: yes - name: "${name} Button" + name: Button # filters: # invert: on_press: @@ -72,11 +72,11 @@ output: light: - platform: binary - name: "${name} Red LED" + name: Red LED id: light_red output: led_red - platform: binary - name: "${name} Blue LED" + name: Blue LED id: light_blue output: led_blue @@ -90,15 +90,15 @@ sensor: current_resistor: ${current_res} voltage_divider: ${voltage_div} current: - name: "${name} Current" + name: Current icon: mdi:flash-circle accuracy_decimals: 3 voltage: - name: "${name} Voltage" + name: Voltage icon: mdi:current-ac power: - name: "${name} Power" - id: "${device_id}_power" + name: Power + id: power icon: mdi:flash-outline on_value_range: - above: ${max_power} @@ -112,14 +112,14 @@ sensor: data_template: message: Switch turned off because power exceeded ${max_power} W energy: - name: "${name} Energy" + name: Energy unit_of_measurement: "Wh" icon: mdi:flash-outline update_interval: 30s change_mode_every: 4 - platform: total_daily_energy - name: "${name} Total Daily Power" - power_id: "${device_id}_power" + name: Total Daily Power + power_id: power accuracy_decimals: 5 filters: # Multiplication factor from W to kW is 0.001 @@ -129,7 +129,7 @@ sensor: switch: - platform: gpio - name: "${name} Relay" + name: Relay # icon: mdi:power-socket-eu pin: GPIO15 id: relay diff --git a/mcu-staircase-light.yaml b/mcu-staircase-light.yaml index fe0d1ea..bd80236 100644 --- a/mcu-staircase-light.yaml +++ b/mcu-staircase-light.yaml @@ -1,11 +1,12 @@ substitutions: device: staircase-light - name: Staircase Light + name: Staircase area: Staircase comment: "${area} | Light" esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -63,7 +64,7 @@ output: light: - platform: binary - name: "${name}" + name: Light id: light_relay output: relay restore_mode: ALWAYS_ON diff --git a/mcu-tft.yaml b/mcu-tft.yaml index 23dc26b..0106791 100644 --- a/mcu-tft.yaml +++ b/mcu-tft.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} platformio_options: diff --git a/mcu-tracker.yaml b/mcu-tracker.yaml index 6413948..5c7f32d 100644 --- a/mcu-tracker.yaml +++ b/mcu-tracker.yaml @@ -5,7 +5,7 @@ substitutions: esphome: name: mcu-${device} - friendly_name: mcu-${device} + friendly_name: ${device} comment: ${comment} on_boot: # priority: -10 @@ -144,40 +144,40 @@ axp192: binary_sensor: - platform: gpio id: modem_dtr - # name: "${name} Cellular DTR" + # name: Cellular DTR pin: 32 - platform: gpio id: modem_ri - # name: "${name} Cellular RI" + # name: ellular RI pin: 33 - platform: gpio id: modem_status - # name: "${name} Cellular Status" + # name: Cellular Status pin: 36 - platform: template id: modem_ready - # name: "${name} Cellular Ready" + # name: Cellular Ready sensor: switch: - platform: gpio id: modem_powerkey - # name: "${name} Cellular PowerKey" + # name: Cellular PowerKey pin: 4 # inverted: true - platform: gpio id: led - # name: "${name} LED" + # name: LED pin: 12 inverted: true - platform: gpio id: modem_enable - # name: "${name} Cellular Enable" + # name: Cellular Enable pin: 25 - platform: axp192 id: gnss_enable - # name: "${name} GNSS Enable" + # name: GNSS Enable port: LDO3 text_sensor: @@ -403,30 +403,30 @@ text_sensor: # binary_sensor: # - platform: sim7600 # registered: -# name: "${name} Cellular" +# name: Cellular # - platform: gpio # id: modem_status -# name: "${name} Cellular Status" +# name: Cellular Status # pin: 36 # sensor: # - platform: sim7600 # rssi: -# name: "${name} Cellular RSSI" +# name: Cellular RSSI # switch: # - platform: gpio # id: modem_powerkey -# # name: "${name} Modem Powerkey" +# # name: Modem Powerkey # pin: 4 # - platform: gpio # id: led -# # name: "${name} LED" +# # name: LED # pin: 12 # inverted: true # - platform: gpio # id: modem_enable -# # name: "${name} Modem Enable" +# # name: Modem Enable # pin: 25 # - platform: axp192 # id: gnss_enable @@ -445,16 +445,16 @@ text_sensor: # text_sensor: # - platform: template # id: sms_sender -# name: "${name} SMS Sender" +# name: SMS Sender # - platform: template # id: sms_message -# name: "${name} SMS Message" +# name: SMS Message # - platform: template # id: caller_id_text_sensor -# name: "${name} Caller ID" +# name: Caller ID # - platform: template # id: ussd_message -# name: "${name} USSD Code" +# name: USSD Code # - platform: serial # uart_id: modem_uart # id: modem_read \ No newline at end of file diff --git a/mcu-tv-light.yaml b/mcu-tv-light.yaml index 9c8adc5..d6fa059 100644 --- a/mcu-tv-light.yaml +++ b/mcu-tv-light.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -30,7 +31,7 @@ light: id: status_led_id pin: 5 - platform: monochromatic - name: "${name}" + name: Strip output: pwm_cold_white effects: - flicker: diff --git a/mcu-vehicle-honda-pcx125.yaml b/mcu-vehicle-honda-pcx125.yaml index d2707a3..2696a6f 100644 --- a/mcu-vehicle-honda-pcx125.yaml +++ b/mcu-vehicle-honda-pcx125.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_loop: @@ -75,7 +76,7 @@ esp32_ble_beacon: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 27 diff --git a/mcu-vehicle-suzuki-dl650.yaml b/mcu-vehicle-suzuki-dl650.yaml index 30d529a..3ae7fe5 100644 --- a/mcu-vehicle-suzuki-dl650.yaml +++ b/mcu-vehicle-suzuki-dl650.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_loop: @@ -75,7 +76,7 @@ esp32_ble_beacon: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 27 diff --git a/mcu-vehicle-toyota-auris-ts.yaml b/mcu-vehicle-toyota-auris-ts.yaml index ffb4445..62ce33d 100644 --- a/mcu-vehicle-toyota-auris-ts.yaml +++ b/mcu-vehicle-toyota-auris-ts.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_loop: @@ -80,7 +81,7 @@ esp32_ble_beacon: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 27 diff --git a/mcu-vehicle-toyota-yaris-cross.yaml b/mcu-vehicle-toyota-yaris-cross.yaml index e6d02d1..80b3777 100644 --- a/mcu-vehicle-toyota-yaris-cross.yaml +++ b/mcu-vehicle-toyota-yaris-cross.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} on_loop: @@ -76,7 +77,7 @@ esp32_ble_beacon: light: - platform: esp32_rmt_led_strip - name: "${name} LED" + name: LED id: led rgb_order: GRB pin: 27 diff --git a/mcu-waterproof-socket.yaml b/mcu-waterproof-socket.yaml index 24cc8dc..f9b707b 100644 --- a/mcu-waterproof-socket.yaml +++ b/mcu-waterproof-socket.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} @@ -28,7 +29,7 @@ binary_sensor: number: GPIO0 mode: INPUT inverted: True - name: "${name} Button" + name: Button on_press: - switch.toggle: relay @@ -46,7 +47,7 @@ output: switch: - platform: gpio - name: "${name} Relay" + name: Relay pin: GPIO12 id: relay on_turn_on: diff --git a/mcu-well.yaml b/mcu-well.yaml index 4a76fc9..4446821 100644 --- a/mcu-well.yaml +++ b/mcu-well.yaml @@ -6,6 +6,7 @@ substitutions: esphome: name: mcu-${device} + friendly_name: ${name} area: ${area} comment: ${comment} # friendly_name: mcu-well