Show status in History

Hi,
I want to see the state of entities in the history. Works fine for a device (relay in a Shelly plus 1), fails for a timer or an input_boolean.
I think, if I can choose items to compose a diagram, this item should show its state, or is this not true for helpers?

Thanks for helping out.

With best regards

Gerhard

Can you explain a bit further?

The History panel most definitely displays input boolean states:

I don’t have any timers set up to test.

1 Like

I do, let me check

1 Like

Timer shows up too…

1 Like

ok, thanks, so what is the magic you use, LiQuid_cOOled??


First row, relay at Shelly device, seecond row a timer which starts running when the pump starts and is stopped together with the pump or expireres after 7 minutes.
Third row an input_booleean, triggered by a switch (custom.button_card) or a time pattern.
Whole automation works fine now, so at least the input_boolean has to change. It do that, I checked the traces of my automation.
Ok, if there is no special thing to config elswhere , something is interesting.

With best regards

Gerhard

@tom_l


Here my setting of the history. Temperatures ok, device ok, but neither timer or input_boolean showing any reaction.
Here the automation:

id: '1708780275099'
alias: Zirkulation Pumpe with timeout
description: ''
trigger:
  - platform: state
    entity_id:
      - input_boolean.zirkulation_status
    id: Switch On
    to: 'on'
    from: 'off'
  - platform: state
    entity_id:
      - input_boolean.zirkulation_status
    to: 'off'
    id: Switch Off
    from: 'on'
  - platform: numeric_state
    entity_id:
      - sensor.shelly1_wwzirkulation_zirkulation_temp
    above: 25
    id: Steigleitung voll
    for:
      hours: 0
      minutes: 0
      seconds: 5
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.zirkulation_pumpe_timeout
    id: timer elapsed
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Switch On
        sequence:
          - if:
              - condition: numeric_state
                entity_id: sensor.shelly1_wwzirkulation_zirkulation_temp
                below: 22
              - condition: state
                entity_id: input_boolean.urlaubsmode
                state: 'off'
            then:
              - service: timer.start
                target:
                  entity_id: timer.zirkulation_pumpe_timeout
                data: {}
              - type: turn_on
                device_id: 5148ffbdfbf5a87f871c65ea0f3d6e40
                entity_id: 38d2bc0cff63e3486dc52831a62a3ced
                domain: switch
            else:
              - service: input_boolean.turn_off
                metadata: {}
                data: {}
                target:
                  entity_id: input_boolean.zirkulation_status
      - conditions:
          - condition: trigger
            id:
              - Switch Off
        sequence:
          - type: turn_off
            device_id: 5148ffbdfbf5a87f871c65ea0f3d6e40
            entity_id: 38d2bc0cff63e3486dc52831a62a3ced
            domain: switch
          - service: timer.cancel
            target:
              entity_id:
                - timer.zirkulation_pumpe_timeout
            data: {}
      - conditions:
          - condition: trigger
            id:
              - Steigleitung voll
        sequence:
          - service: input_boolean.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.zirkulation_status
      - conditions:
          - condition: trigger
            id:
              - timer elapsed
        sequence:
          - service: input_boolean.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.zirkulation_status
    default:
      - type: turn_off
        device_id: 5148ffbdfbf5a87f871c65ea0f3d6e40
        entity_id: 38d2bc0cff63e3486dc52831a62a3ced
        domain: switch
        enabled: false
      - service: input_boolean.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: input_boolean.zirkulation_status
mode: queued
max: 10

You can see, the timer is started or canceled and the input_boolean needs to be set to on, otherwise the pump won’t start.

With best regards
Gerhard

Have you tried to start the timer entity from here?

image

What duration is specified for the timer?

Also, are you sure that the automation works OK?
Suggest to add logging (persistent notification) into every logical branch.

Try changing states of the timer & input_boolean manually.
If these changes are reflected in History - then the automation is wrong.

Or just look at the automation trace.

You’re only turning the input_boolean off.

There are no turn on services.

Oh, lot of answers.
First of all, the automation works. In one of my screenshots you can see, the pump starts AND the temperatures start changing, cause the hot water starts to circulate. This is the best proof I can think about.
The automation has 4 triggers, the first one fires when my input_boolean changes from ‘Off’ to ‘on’ and in this case the timer gets started and the Shelly 1 plus closes the contacts of its relay.
As far as I know, the input_boolean has the state ‘on’ and … nothing happens in the histrory.
The timer runs 7 minutes if the temperature didn’t reach 25°C within this time. Normally, it takes ~ 5 minutes to get over 25°C, so the automation is triggered (trigger number 3) and in this case, the input_boolean is switched off. This isn’t reflected in the UI too. The automation is a queued one, so the ‘switch the input_boolean off’ trigger is queued up and processed during the next lap. In the next lap, the state changes from ‘on’ to ‘off’ and this time the timer is canceled and the relay is opened (trigger 2).
This works all fine with manual starts and stops, or triggered by a timee pattern.

I also have anotheer input_boolean ‘Holiday-Mode’ or in german ‘Urlaubsmodus’. I add it to the histrory and switched it on/off manually, and this time no problem.

BUT: There is a little difference between this two items. The input_boolean I used for the pump has a reference to a speech assistant I will add later, the ‘Urlaubsmode’ not.

With best regards

Gerhard

PS: Will start the timer manually and check out …

Hi all,
so I started the timer just as Ildar_Gabdullin told me, and wait for about 10 minutes, nothing happens in the histrory, timer shows ‘Idle’ nothing elsee …

With best regards

Gerhard

When you started a timer - did you see this?

image

Yes … I see this.

Start a timer from it’s more-info window, then press a corr button on the right part of the window to show a History for the timer - does it show the started timer?

Also, I already suggested to do the same with input boolean.

If manual changes of timer & boolean are reflected in History - then sort out why these entities are not changed by automation.

Hi all,
at 7 pm or (19:00) a time pattern started my circulation pump. Here the trace of the automation:


After some checks the pump starts running, the timer is triggered.

After ~ 5 minutes the temperature in the system is high enough, and so the state of my input_boolean is set to ‘off’. This results in a trigger which is queued up for the moment.

In the next lap, the timer is canceled and the pump is switched off.
Thats it, no more triggers in the queue.
This is exactly I want to do and I am pretty sure it works out.

And here you can see, that the temperatures physically raises, so this is the best proof I can think off, it works.
And you can see, no reaction in the histrory plot, for what reason ever.

With beest regards

Gerhard

Hi all,
ok, I should check the history of the helper itself:


The whole day status ‘off’.
Ok, and who is triggering my automation?, please check the above traces …

Very mystic.

With best regards

Gerhard

3rd time: switch on/off this input_boolean. And check what is on the History.

Hi all,
and here the timer:


And the histrory of that timer after some time passed by:

And than the timer elapsed:

The automation is triggered and set the input_boolean to ‘off’. As the input_boolean was already in ‘off’ state, there is no listener in the automation for a state ‘change’ from ‘off’ to ‘off’, so no more trigger queued and the automation finishing at that point.

Ok, sorry, I cant’t do anything else …

With best regards
Gerhard

BTW.
I proposed to manually start a timer - and see how it is reflected in History.
Funny thing that I see no changes of my timer in History))))):

  1. Open History with the timer in one tab.

  2. On another tab - open more-info for the timer - and start it.

  3. On the History tab I see changes:

  4. Refresh the page or reopen the History - it has no changes:

It may happen only for entities excluded from Recorder.
But there are no mentions in “recorder.yaml” (which has “exclude” rules) for the timer.
On another test HA setup - which has no “recorder.yaml” specified - the history of the timer is shown.

Maybe you already answered this, but I do not see any input_boolean.turn_on service calls in the automation, so I have no idea how it would ever be on.