Show status in History

My timer is always manually started and shows up in history immediately. I use an automation, input_boolean and a script to manually complete the timer.

I’d be happy to share the automation code if you think it would help.

alias: Pihole disable
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.pi_hole_timer
    to: "on"
condition: []
action:
  - service: timer.start
    data:
      duration: "{{ states('input_number.pi_hole_timer') | int*60 }}"
    target:
      entity_id: timer.pi_hole_timer
  - service: switch.turn_off
    data: {}
    target:
      entity_id:
        - switch.pi_hole
  - service: homeassistant.update_entity
    target:
      entity_id:
        - switch.pi_hole_group
        - switch.pi_hole
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: "{{ states('input_number.pi_hole_timer') | int*60}}"
      milliseconds: 0
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.pi_hole
  - service: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.pi_hole_timer
  - service: homeassistant.update_entity
    target:
      entity_id:
        - switch.pi_hole_group
        - switch.pi_hole
    data: {}
mode: single

My timer history stay even after a refresh. Odd

Tested on another fresh empty setup (same 2024.2.5) with SAME recorder.yaml.
Timer changes are persistently shown in History even after F5.
Odd )))

Hmm, just created an “input_select” helper - and it is not saved in History. great.

Deleted all timers - then created new (with same names) timers.
These timers do have a History. Weird.
And after a couple of “timer start” - again no History.

1 Like

Hi petro,
the auotomation is triggered by an input_boolean (trigger 1) and this input_boolean is set/reset by a custom.button_card button, or a time pattern.
As you can see, it works fine.

Hi all the rest,
ok, seems there is some strange behaviour, ok, no problem, hope somebody with the right knowledge will find the time to fix it once a day.

With best reegards

Gerhard

PS: Today the calender sets my ‘holiday’ input_boolean to ‘on’, because I am in a rehabilitation facility trying to get my right leg ok again, and this was reflected in the history and also stops the activation of the circulation pump. ==> works fine. ==> my first real wold automation is ok.
Thanks all for helping.

Gerhard

Honestly we want to help! Maybe eliminate the custom button card step. I’ve seen delays with that mod.

Make it simple then extravagant, that’s my motto when problem solving.

Ok.
I am a newbee to HA, so what other control should I use instead?

With best regards

Gerhard

My setup uses a custom button, but the custom Button controls didn’t work for me either. I ended up creating a script with the finished the timer command.

My input boolean and the actual timer would get out of sequence and it would stop controlling the switch. The timer:cancel command was useless for me, but timer:finished worked well for my setup.

Hi LiQuid_cOOled,
I tested two things now.

First I add a switch card and linked it to my input_boolean which represents the state of the circulation system and which starts/stops the automation by triggers.
First trace: pump relay, second trace timer, third trace input_boolean ‘state’ and forth trace input_boolean ‘Holiday’.
I have to switch the holiday-mode off, than I started the circulation with this new switch. After some seconds I stopped it and I switched holiday on again (as a marker).
No changes in history.
Now I deleted the custom.button card, and do the same test, with the same result.

Some more tests, hope this test is the basic test, no easier/simpler test possible.
Create a helper of type timer called ‘test-timer’
Restart HA.
Click the test-timer in the list of ‘helpers’


… and click start.

Timer is counting down, as expected. Wait until thee timer expires.
Click the history button …

… sorry, but there is a bug.
Fresh timer, not linked to any other device/helper/entity and started from its own configuration UI, checked with its onw configuration UI …

With best regards

Gerhard

There may be, this is the second time I’ve heard someone having an issue with history, however the issue is not in history. If you look at the states table, there won’t be a state change. Something is blocking state changes from making it into the history table. It’s worth an issue as you’re not the first to mention this. A guy a few days ago was having the same issue with 2 input booleans.

Please mark it as a history problem and provide your states table and automation. This will be a hard issue to track down.

1 Like

Hi petro,
ok, will provide this info later.
Please tell me (I am newbee) where to get the requested infos easily. Thanks a lot

With best reegards

Gerhard

Hi petro,
I found at deveelopment tools somthing, and here the state of the timer changes:

With best regards
Gerhard

Hi,
any news?

With beest regards

Gerhard

Hi,
found out that one of the updates in the last weeks solve the problem.
THANKS.
With best regards
Gerhard