IKEA blueprint, replaced bathroom sensor with ESPHome.
This commit is contained in:
parent
d8cb73ebf0
commit
8cad164008
110
blueprints/automation/cecche/ikea-somrig-remote-e2213-zha.yaml
Normal file
110
blueprints/automation/cecche/ikea-somrig-remote-e2213-zha.yaml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
blueprint:
|
||||||
|
name: ZHA - IKEA Somrig remote dot-buttons control
|
||||||
|
description: Fully customisable dot-buttons, with options for single, double and
|
||||||
|
long press for each one.
|
||||||
|
domain: automation
|
||||||
|
input:
|
||||||
|
remote:
|
||||||
|
name: Remote
|
||||||
|
description: IKEA Somrig remote to use
|
||||||
|
selector:
|
||||||
|
device:
|
||||||
|
integration: zha
|
||||||
|
manufacturer: IKEA of Sweden
|
||||||
|
model: SOMRIG shortcut button
|
||||||
|
multiple: false
|
||||||
|
single_dot_single_press:
|
||||||
|
name: Single dot (Single press)
|
||||||
|
description: Action to run on single dot press
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
single_dot_double_press:
|
||||||
|
name: Single dot (Double press)
|
||||||
|
description: Action to run on single dot double press
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
single_dot_long_press:
|
||||||
|
name: Single dot (Long press)
|
||||||
|
description: Action to run on single dot long press
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
single_dot_long_release:
|
||||||
|
name: Single dot (Release after long press)
|
||||||
|
description: Action to run on releasing after a long press on the single dot
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
double_dot_single_press:
|
||||||
|
name: Double dot (Single press)
|
||||||
|
description: Action to run on double dot press
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
double_dot_double_press:
|
||||||
|
name: Double dot (Double press)
|
||||||
|
description: Action to run on double dot double press
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
double_dot_long_press:
|
||||||
|
name: Double dot (Long press)
|
||||||
|
description: Action to run on double dot long press
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
double_dot_long_release:
|
||||||
|
name: Double dot (Release after long press)
|
||||||
|
description: Action to run on releasing after a long press on the double dot
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
action: {}
|
||||||
|
source_url: https://community.home-assistant.io/t/ikea-somrig-remote-e2213-zha/668671
|
||||||
|
mode: single
|
||||||
|
max_exceeded: silent
|
||||||
|
trigger:
|
||||||
|
- platform: event
|
||||||
|
event_type: zha_event
|
||||||
|
event_data:
|
||||||
|
device_id: !input remote
|
||||||
|
action:
|
||||||
|
- variables:
|
||||||
|
command: '{{ trigger.event.data.command }}'
|
||||||
|
cluster_id: '{{ trigger.event.data.cluster_id }}'
|
||||||
|
endpoint_id: '{{ trigger.event.data.endpoint_id }}'
|
||||||
|
args: '{{ trigger.event.data.args }}'
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''short_release'' }}'
|
||||||
|
- '{{ endpoint_id == 1 }}'
|
||||||
|
sequence: !input single_dot_single_press
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''multi_press_complete'' }}'
|
||||||
|
- '{{ endpoint_id == 1 }}'
|
||||||
|
sequence: !input single_dot_double_press
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''long_press'' }}'
|
||||||
|
- '{{ endpoint_id == 1 }}'
|
||||||
|
sequence: !input single_dot_long_press
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''long_release'' }}'
|
||||||
|
- '{{ endpoint_id == 1 }}'
|
||||||
|
sequence: !input single_dot_long_release
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''short_release'' }}'
|
||||||
|
- '{{ endpoint_id == 2 }}'
|
||||||
|
sequence: !input double_dot_single_press
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''multi_press_complete'' }}'
|
||||||
|
- '{{ endpoint_id == 2 }}'
|
||||||
|
sequence: !input double_dot_double_press
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''long_press'' }}'
|
||||||
|
- '{{ endpoint_id == 2 }}'
|
||||||
|
sequence: !input double_dot_long_press
|
||||||
|
- conditions:
|
||||||
|
- '{{ command == ''long_release'' }}'
|
||||||
|
- '{{ endpoint_id == 2 }}'
|
||||||
|
sequence: !input double_dot_long_release
|
@ -74,7 +74,7 @@ media_player:
|
|||||||
generic_hygrostat:
|
generic_hygrostat:
|
||||||
- name: Badezimmer
|
- name: Badezimmer
|
||||||
humidifier: fan.badezimmer_ventilator
|
humidifier: fan.badezimmer_ventilator
|
||||||
target_sensor: sensor.badezimmer_luftfeuchtigkeit
|
target_sensor: sensor.bathroom_badezimmer_luftfeuchtigkeit
|
||||||
min_humidity: 30
|
min_humidity: 30
|
||||||
max_humidity: 70
|
max_humidity: 70
|
||||||
target_humidity: 50
|
target_humidity: 50
|
||||||
|
57
esphome/badezimmer-luft.yaml
Normal file
57
esphome/badezimmer-luft.yaml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
substitutions:
|
||||||
|
name: "bathroom"
|
||||||
|
friendly_name: "Bad"
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: ${name}
|
||||||
|
friendly_name: ${friendly_name}
|
||||||
|
name_add_mac_suffix: false
|
||||||
|
project:
|
||||||
|
name: sensor.outdoor
|
||||||
|
version: "0.8"
|
||||||
|
min_version: 2022.1.0
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-c3-devkitm-1
|
||||||
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "Voltage-legacy"
|
||||||
|
password: !secret voltage_legacy_psk
|
||||||
|
use_address: bathroom.home
|
||||||
|
power_save_mode: high
|
||||||
|
fast_connect: on
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "Bad Fallback Hotspot"
|
||||||
|
password: !secret fallback_psk
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: !secret apikey
|
||||||
|
|
||||||
|
ota:
|
||||||
|
password: !secret ota
|
||||||
|
|
||||||
|
# DHT22 sensor
|
||||||
|
sensor:
|
||||||
|
- platform: dht
|
||||||
|
model: dht22
|
||||||
|
pin: 4
|
||||||
|
temperature:
|
||||||
|
name: "Badezimmer Temperatur"
|
||||||
|
humidity:
|
||||||
|
name: "Badezimmer Luftfeuchtigkeit"
|
||||||
|
update_interval: 60s
|
||||||
|
# WiFi signal strength
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: "WiFi Signalstärke"
|
||||||
|
update_interval: 60s
|
@ -460,7 +460,7 @@ display:
|
|||||||
it.print(357, 130, id(sub_sensor_font), TextAlign::BASELINE_RIGHT, " - %");
|
it.print(357, 130, id(sub_sensor_font), TextAlign::BASELINE_RIGHT, " - %");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(air_pressure < 1200 && air_pressure >=800) {
|
if(air_pressure < 1200 && air_pressure >=700) {
|
||||||
it.printf(220, 130, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.1f", air_pressure);
|
it.printf(220, 130, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.1f", air_pressure);
|
||||||
it.print(225, 130, id(sensor_unit), TextAlign::BASELINE_LEFT, "hPa");
|
it.print(225, 130, id(sensor_unit), TextAlign::BASELINE_LEFT, "hPa");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user