Hi guys and girls
I want to make a sensor for my floorplan weather forecast that shows’ an input_number stored three hours ago.
Every 3 hours i store barometric data in eight different input_numbers.
From time 00:00-21:00.
I have spent some time, describing my configuration setup that I use in my floorplan, so that others might get some inspiration.
Input_number:
barometerdatareadings00:
name: 'Barometerdata kl00'
min: 960
max: 1060
step: 0.1
Barometric realtime sensor (with 0 decimals):
# Barometric data with 0 decimals ##
barometerstand:
friendly_name: "Baromererstand without decimals"
unit_of_measurement: 'hPa'
value_template: >-
{{ states('sensor.pressure_lumi_158d00022cc292')|int }}
Automation:
Read biometric data at time xx:xx and store the value in an input_number
- id: airpressurereadingsat0000
alias: air pressure readings at 0000
trigger:
- platform: time
at: "00:00:00"
action:
service: input_number.set_value
target:
entity_id: input_number.barometerdatareadings00
data:
value:
'{{ states("sensor.barometerstand")|int}}'
In an automation I use the biometric data to trigger an input_boolean.
This input_boolean on/off is used to trigger 8 icons icon1on.png and inon1off.png and so on.
When the barometric data scoope (960-955) changes to (995-1000) the “old” input_boolean is turned off and the new one is turned on.
- id: barometervaluestriggerinputboolean
alias: barometer values trigger inputboolean
trigger:
- platform: time
at:
- "00:00:00"
- "03:00:00"
- "06:00:00"
- "09:00:00"
- "12:00:00"
- "15:00:00"
- "18:00:00"
- "21:00:00"
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.pressure_lumi_158d00022cc292
above: 960
below: 995
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.barometerstand960_995rain
- service: input_boolean.turn_off
target:
- entity_id: input_boolean.barometerstand995_1005mostcloudy
- entity_id: input_boolean.barometerstand1005_1015sunclouds
- entity_id: input_boolean.barometerstand1015_1060sunshine
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.pressure_lumi_158d00022cc292
above: 995
below: 1000
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.barometerstand995_1005mostcloudy
- service: input_boolean.turn_off
target:
- entity_id: input_boolean.barometerstand960_995rain
- entity_id: input_boolean.barometerstand1005_1015sunclouds
- entity_id: input_boolean.barometerstand1015_1060sunshine
In my floorplan configuration I use this input_boolean to turn an icon on or off.
Floorplan:
Floorplan configuration for weatherforecast:
Input_boolean on/off trigger’s the icon for the barometric data:
- entity: input_boolean.barometerstand1015_1060sunshine
title: Regn barometerstand 1015 til 1060 sunshine
hold_action:
action: none
tap_action:
action: none
image: /local/floorplan/barometericoner/soloff.png
state_filter:
'off': brightness(0%) saturate(1)
'on': brightness(100%) saturate(1)
state_image:
'on': /local/floorplan/barometericoner/solon.png
style:
left: 70.5%
top: 71.7%
width: 8%
opacity: 1
type: image