Help with temperature sensor and automation

Hi
I have installed a new thermostat and integrate it to HA and I need some help with the following
the configuration.yaml is

#Thermostat
  - platform: floureon
    host: 192.168.1.XXX
    mac: '24:DF:A7:13:XX:XX'
    name: Beok_Thermostat 
    use_external_temp: false

the entity is

climate.beok_thermostat

the states of the thermostat are

hvac_modes:
  - auto
  - heat
  - 'off'
current_temperature: 21
min_temp: 5
max_temp: 26
temperature: 6
hvac_action: 'off'
preset_mode: none
preset_modes:
  - away
  - none
away_temp: 7
manual_temp: 7
friendly_name: Beok_Thermostat
supported_features: 17

I don’t know how to add (find,declare) in the below automation the temperature sensor
and how I could turn it off at 21:00

- id: Thermostat
  alias: Home Heater
  trigger:
    platform: numeric_state
    entity_id: sensor.temperature
    below: 19
  condition:
    condition: time
    after: '17:00:00'
    before: '20:00:00'
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.beok_thermostat
        hvac_mode: 'heat'
        temperature: 26

First, your trigger is going to be time, since you want to turn off the heat at 21:00.

- alias: Home Heater
  trigger:
    platform: time
    at: '21:00:00'

In your action, you’re setting the heat to 26, not turning it off. I’m a bit confused by your code vs. what you’re saying. To turn the heat off, you’d use this:

  action:
    -service: climate.set_hvac_mode
     data:
       entity_id: climate.beok_thermostat
       hvac_mode: 'off'

Maybe I was not clear.
I want to open the the heat if is between 17:00 - 20:00 and the temperature is below 19 (I don’t know how to “find” the temperature sensor though) and at 21:00 to be off.
Ideally I would like if possible to be in one automation but if it can’t be done then I will go with 2 automations one for “ON” and one for turn it “OFF”

Ah, easy one. You can get the current temperature by using

state_attr('climate.thermostat', 'current_temperature') | float

So you’d have to use a template trigger.

trigger:
  - platform: template
    value_template: "{{ state_attr('climate.thermostat', 'current_temperature') | float < 19 }}"

ok, I placed the following code in developers tools - template

"{{ state_attr('climate.thermostat', 'current_temperature') | float < 19 }}"

and I get “True”. However the temperature is 22 at the moment. Shouldn’t be “false”?

I am asking because if I understand it right, it means that it will open the thermostat.

Sorry for my ignorance but I am a noob.

i tried the following and it works. this gives me false

"{{ state_attr('climate.beok_thermostat', 'current_temperature') | float < 19 }}"

and this one true

"{{ state_attr('climate.beok_thermostat', 'current_temperature') | float < 25 }}"

Can you post the state and attributes of your climate entity from the dev states page?

I just realized that when you said it didn’t work, you were using my code which didn’t have your thermostat name in there properly. Your change is correct.

So if you have that template trigger, when the current temperature goes below 19, it’ll trigger the automation to run, and perform whatever actions you specify.