indoor temp sensor
This commit is contained in:
@@ -172,6 +172,16 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
|
|||||||
entity:
|
entity:
|
||||||
domain:
|
domain:
|
||||||
- sensor
|
- sensor
|
||||||
|
|
||||||
|
indoortemp:
|
||||||
|
name: Indoor Temperature Sensor (Optional)
|
||||||
|
description: '* *An indoor temperature sensor is not necessary. Leave the field empty if you want to use the temperature sensor of the NSPanel. Additionally a temperature correction for the NSPanel sensor is possible under HA Devices. So everyone can adjust the sensor exactly*'
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
domain:
|
||||||
|
- sensor
|
||||||
|
|
||||||
humidity:
|
humidity:
|
||||||
name: Humidity Sensor (Optional)
|
name: Humidity Sensor (Optional)
|
||||||
description: '* *Choose your humidity sensor*'
|
description: '* *Choose your humidity sensor*'
|
||||||
@@ -1285,6 +1295,7 @@ trigger_variables:
|
|||||||
display_target_temperature: "sensor.{{ nspanel_name_trigger }}_display_target_temperature"
|
display_target_temperature: "sensor.{{ nspanel_name_trigger }}_display_target_temperature"
|
||||||
relay01_entity: "switch.{{ nspanel_name_trigger }}_relay_1"
|
relay01_entity: "switch.{{ nspanel_name_trigger }}_relay_1"
|
||||||
relay02_entity: "switch.{{ nspanel_name_trigger }}_relay_2"
|
relay02_entity: "switch.{{ nspanel_name_trigger }}_relay_2"
|
||||||
|
nspaneltemp: "sensor.{{ nspanel_name_trigger }}_temperature"
|
||||||
|
|
||||||
##### notification Trigger #####
|
##### notification Trigger #####
|
||||||
notification_unread: "switch.{{ nspanel_name_trigger }}_notification_unread"
|
notification_unread: "switch.{{ nspanel_name_trigger }}_notification_unread"
|
||||||
@@ -1336,6 +1347,7 @@ variables:
|
|||||||
humidity: !input "humidity"
|
humidity: !input "humidity"
|
||||||
hotwatertemp: !input "hotwatertemp"
|
hotwatertemp: !input "hotwatertemp"
|
||||||
outdoortemp: !input "outdoortemp"
|
outdoortemp: !input "outdoortemp"
|
||||||
|
indoortemp: !input "indoortemp"
|
||||||
climate: !input "climate"
|
climate: !input "climate"
|
||||||
|
|
||||||
#### HARDWARE BUTTONS #####
|
#### HARDWARE BUTTONS #####
|
||||||
@@ -2068,6 +2080,20 @@ trigger:
|
|||||||
entity_id: !input "outdoortemp"
|
entity_id: !input "outdoortemp"
|
||||||
id: outdoortemp_state
|
id: outdoortemp_state
|
||||||
|
|
||||||
|
##### indoor Temp Sensor - Trigger "indoortemp_state" #####
|
||||||
|
- platform: event
|
||||||
|
event_type: state_changed
|
||||||
|
event_data:
|
||||||
|
entity_id: !input "indoortemp"
|
||||||
|
id: indoortemp_state
|
||||||
|
|
||||||
|
##### NSPAnel Temp Sensor - Trigger "nspaneltemp_state" #####
|
||||||
|
- platform: event
|
||||||
|
event_type: state_changed
|
||||||
|
event_data:
|
||||||
|
entity_id: '{{ nspaneltemp }}'
|
||||||
|
id: nspaneltemp_state
|
||||||
|
|
||||||
##### Hot Water Charge - Trigger "hotwatercharge_state" #####
|
##### Hot Water Charge - Trigger "hotwatercharge_state" #####
|
||||||
- platform: event
|
- platform: event
|
||||||
event_type: state_changed
|
event_type: state_changed
|
||||||
@@ -2776,7 +2802,7 @@ action:
|
|||||||
{%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }}
|
{%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }}
|
||||||
{%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}}
|
{%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}}
|
||||||
{%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
|
{%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}}
|
||||||
{%- else -%} 0
|
{%- else -%} sensor.nspanel_dev_temperature
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
- delay:
|
- delay:
|
||||||
milliseconds: "{{ delay_value }}"
|
milliseconds: "{{ delay_value }}"
|
||||||
@@ -2785,6 +2811,19 @@ action:
|
|||||||
component: home.outdoor_temp
|
component: home.outdoor_temp
|
||||||
message: "{{ outdoor_temp }}°"
|
message: "{{ outdoor_temp }}°"
|
||||||
|
|
||||||
|
##### NSPanel boot init - Indoor Temp #####
|
||||||
|
- variables:
|
||||||
|
indoor_temp: >-
|
||||||
|
{%- if indoortemp is match "sensor." and states(indoortemp).state != "unavailable" -%} {{ states(indoortemp) |round(0) }}
|
||||||
|
{%- else -%} {{ nspaneltemp }}
|
||||||
|
{%- endif -%}
|
||||||
|
- delay:
|
||||||
|
milliseconds: "{{ delay_value }}"
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: home.current_temp
|
||||||
|
message: "{{ indoor_temp }}°"
|
||||||
|
|
||||||
##### Weather Icon Home Page
|
##### Weather Icon Home Page
|
||||||
- variables:
|
- variables:
|
||||||
weather_pic: >-
|
weather_pic: >-
|
||||||
@@ -4315,6 +4354,35 @@ action:
|
|||||||
message: "{{ trigger.event.data.new_state.state |round(0) }}°"
|
message: "{{ trigger.event.data.new_state.state |round(0) }}°"
|
||||||
|
|
||||||
|
|
||||||
|
##### Indoor Temp Entity #####
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: indoortemp_state
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ trigger.event.data.new_state.state != 'unavailable' }}"
|
||||||
|
sequence:
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: home.current_temp
|
||||||
|
message: "{{ trigger.event.data.new_state.state |round(0) }}°"
|
||||||
|
|
||||||
|
##### Indoor NSPANEL Temp Entity #####
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: nspaneltemp_state
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ trigger.event.data.new_state.state != 'unavailable' }}"
|
||||||
|
sequence:
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ indoortemp is not match "sensor." }}'
|
||||||
|
then:
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: home.current_temp
|
||||||
|
message: "{{ trigger.event.data.new_state.state |round(0) }}°"
|
||||||
|
|
||||||
|
|
||||||
##### Weather state change update #####
|
##### Weather state change update #####
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ sensor:
|
|||||||
then:
|
then:
|
||||||
- wait_until:
|
- wait_until:
|
||||||
switch.is_on: nextion_init
|
switch.is_on: nextion_init
|
||||||
- lambda: id(disp1).set_component_text_printf("home.current_temp", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page.
|
# - lambda: id(disp1).set_component_text_printf("home.current_temp", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page.
|
||||||
# - lambda: id(disp1).set_component_text_printf("climate.current_temp", "%.1f", id(temp_nspanel).state);
|
# - lambda: id(disp1).set_component_text_printf("climate.current_temp", "%.1f", id(temp_nspanel).state);
|
||||||
|
|
||||||
##### current value of page-climate target_temp #####
|
##### current value of page-climate target_temp #####
|
||||||
|
|||||||
Reference in New Issue
Block a user