#Is there a way to append a °C

1 messages · Page 1 of 1 (latest)

deft pecan
#

Not to the value, unless you use an input text, but ... you want the number, not a string with the units in it

quartz steppe
#

Yeah it is just cosmetics

#

Would be nice to have a unit option

deft pecan
#

A numeric state trigger wouldn't work if you had an input_number with a state of 15°C

quartz steppe
#

Sure it wouldn't. I know the difference between a float and a string

#

I just think the easiest way wold be an option to add a unit string in the configuration.yml

deft pecan
#

That's what you'd do with customising

quartz steppe
#

Which is of course not part of the integer

deft pecan
#

There's a standard attribute unit_of_measurement

quartz steppe
#

Awesome

#

That is what I meant

#

Thanks 🙂

quartz steppe
#

How to use it for the automation then?

#

I tried this

type: temperature
platform: device
device_id: 2877e714d4a9f31dcdcbd14882ba4dcc
entity_id: sensor.thermometer_wohnzimmer_temperature
domain: sensor
below: 
  data: 
    value: "{{ states('input_number.wohnzimmertemperatur_slider') | float }}"
for:
  hours: 0
  minutes: 0
  seconds: 0
deft pecan
#

With a numeric state trigger, as I said before

#
automation:
  trigger:
    - platform: numeric_state
      entity_id: sensor.temperature
      below: input_number.wohnzimmertemperatur_slider
quartz steppe
#

Nice

#

There is one problem though. It only triggers this when it passes that value. My room temperature is 19.8°C now and nothing happens when I put the slider to 20°C

#

That is not an issue when you have a fixed value, but when you use the slider often, HA doesn't react

deft pecan
#
    - platform: numeric_state
      entity_id: input_number.wohnzimmertemperatur_slider
      above: sensor.temperature
#

Add both

quartz steppe
#

Both as trigger?

deft pecan
#

Yes

quartz steppe
#

I don't know how that will solve my problem

deft pecan
#

Because it's the change in the entity that causes a trigger to be evaluated

#

If you move the slider then the second trigger will be evaluated

#

If the sensor updates then the first trigger will be evaluated

quartz steppe
#

No that doesn't work as I expected.

#

The entity value should be polled or something

#

Guess that would be a waste of resources though

deft pecan
#

The entity in the above/below is only checked when the entity_id entity updates

#

So, with both triggers you'll find it runs when either the sensor goes below the input_number, or you change the input_number to be above the sensor

quartz steppe
#

But I want it to turn off when the entity is above the slider

#

and vice versa

deft pecan
#

Then ... write them that way

quartz steppe
#

I guess I have to wait until the thermometer reports back

deft pecan
#

use above the input number and below the sensor

quartz steppe
#

Stupid cheap Aqara sensors don't do it that often

#

Some day I will buy better sensors and Tado TRVs

deft pecan
#
automation:
  trigger:
    - platform: numeric_state
      entity_id: sensor.temperature
      above: input_number.wohnzimmertemperatur_slider
    - platform: numeric_state
      entity_id: input_number.wohnzimmertemperatur_slider
      below: sensor.temperature
#

Job done

quartz steppe
#

But the Tados only work with a bridge unfortunately

#

I have two automations for that

#

One to turn them on and one to turn them off

#

Is that wrong?

deft pecan
#

Wrong?

#

There's no right or wrong ...

quartz steppe
#

I don't get why I should set the trigger to above and below

deft pecan
#

Did you read what I wrote?

#

Or did you skim it and not pay attention to the entities in both triggers

quartz steppe
#

Yes but I don't understand

deft pecan
#

So, with both triggers you'll find it runs when either the sensor goes below the input_number, or you change the input_number to be above the sensor

quartz steppe
#

Ah you flipped entity and sensor

#

Now I get it

deft pecan
#

Hence why I asked if you'd read, or skimmed 😉

quartz steppe
#

I have trouble focusing

#

I tried meditating etc

#

I accepted it at some point

deft pecan
#

More coffee... it won't help, but you can blame having too much of it zany

quartz steppe
#

It's 10 pm here...

#

Besides, when I drink more than 2 mugs, I can't sleep at night

deft pecan
#

Yeah, I know what you mean. I won't have any after lunchtime to avoid sleep issues

quartz steppe
#

Same

#

One strong coffee in the morning is enough

#

It is also not like it gives you energy. It just blocks receptors that tell you that you don't

#

So you think you are awake, but you actually aren't

#

Rather take some amphetamine if you really want to be awake 😄

#

But I can't recommend that

#

HA is so nice. Now I only need a better slider. Pity this custom slider card doesn't support input_number entities