Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workday sensor don't updating state in 2024.6.0b3 #118688

Closed
piio opened this issue Jun 3, 2024 · 32 comments · Fixed by #119148
Closed

Workday sensor don't updating state in 2024.6.0b3 #118688

piio opened this issue Jun 3, 2024 · 32 comments · Fixed by #119148
Assignees
Milestone

Comments

@piio
Copy link

piio commented Jun 3, 2024

The problem

After updating to beta 2024.6.0b3 workday sensor is not refreshing automatically.
In logs there is nothing regarding workday sensor.

What version of Home Assistant Core has the issue?

2024.6.0b3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jun 3, 2024

Hey there @fabaff, @gjohansson-ST, mind taking a look at this issue as it has been labeled with an integration (workday) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of workday can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign workday Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


workday documentation
workday source
(message by IssueLinks)

@joostlek joostlek added this to the 2024.6.0 milestone Jun 3, 2024
@gjohansson-ST
Copy link
Member

the sensor only updates once a day which is just after midnight.
Are you sure it's not updating as it's meant too?

@piio
Copy link
Author

piio commented Jun 3, 2024

Hi,

I checked it today morning - it didn't change state, but it should from off to on.
I updated HA to 2024.6.0b5, after restart state was changed to correct one - i will change state using developer tools to off and will check tomorrow if state changed to on
Zrzut ekranu z 2024-06-03 11-35-01

@gjohansson-ST
Copy link
Member

Thanks for providing some input. I will do a test myself and see if I can replicate the behavior. 👍

@callimeroetsombrero
Copy link

Same here. Tried as well to update the sensor with an automation.

@piio
Copy link
Author

piio commented Jun 4, 2024

Today at 00:00 state of workday sensor changed automatically from off to on.

@gjohansson-ST
Copy link
Member

I took a look at my own (still on b3) and it also did a refresh this night at 00:00 so I believe it's working as it's supposed to but let's keep the issue open until release and we can monitor so it's not flaky.
It doesn't support manual (automation) refresh so it needs to update itself each night.

@Molodax
Copy link

Molodax commented Jun 6, 2024

Maybe related, today is a holiday in Sweden due to National day, however, the sensor's state is "on". Home Assistant core 2024.6.0

@gjohansson-ST
Copy link
Member

Maybe related, today is a holiday in Sweden due to National day, however, the sensor's state is "on". Home Assistant core 2024.6.0

What does the sensor say as last updated?

@Molodax
Copy link

Molodax commented Jun 6, 2024

Maybe related, today is a holiday in Sweden due to National day, however, the sensor's state is "on". Home Assistant core 2024.6.0

What does the sensor say as last updated?

Last updated 18 hours ago, i.e. yesterday when the system was updated to 2024.6.0

@hvorragend
Copy link

Same problem here. Tomorrow is Saturday and my workday tomorrow sensor is 21 hours old and says: ON

I have tried it with homeassistsant.update_entity without success.

But the checkdate response was OFF

@laosz77
Copy link

laosz77 commented Jun 7, 2024

Same behaviour here. Upgraded to 2024.6 on thursday, and as of today (friday), my "Thursday day" sensor shows TRUE, and "Friday day" sensor shows FALSE.

@piio
Copy link
Author

piio commented Jun 7, 2024

Also mine workday_tomorrow (with days_offset 1) shows on instead of off

Reloading using reload_config_entry changed state to off

service: homeassistant.reload_config_entry
data: {}
target:
entity_id: binary_sensor.workday_tomorrow

My configuration of workday sensors:
workdays:

  • mon
  • tue
  • wed
  • thu
  • fri
    excludes:
  • holiday
    days_offset: 0
    friendly_name: Workday Sensor

workdays:

  • mon
  • tue
  • wed
  • thu
  • fri
    excludes:
  • holiday
    days_offset: 1
    friendly_name: workday_tomorrow

@line-nz
Copy link

line-nz commented Jun 7, 2024

Same issue here, recent upgrade to 2024.6, 7am workday wake up call on a Saturday

Workday service shows as still on, no update at midnight

@gavinpbennett
Copy link

gavinpbennett commented Jun 7, 2024

Same here, it is Saturday morning and sensor still shows as workday On. If I run Workday check in Dev tools, it returns the correct response.
Updated to 2024.6.1, same result. Workday sensor does not update. Workday Check date returns correct response.

@jeremysherriff
Copy link

jeremysherriff commented Jun 7, 2024

Confirming same issue here in NZ (UTC+12), sensor still showing as on despite being a normal weekend.
Dev tools service call returns correct false response.
HAOS, on 2024.6.0

Low-key glad to know it's not me going insane, had to check with the wife twice to confirm I wasn't supposed to be at work 😄

@rover1955
Copy link

Same here in Melbourne (UTC+10). Saturday morning and binary_sensor.workday_sensor is TRUE but Workday Check Service shows False (correctly). Updated to 2024.6.0 last Thursday and 2024.6.1 this morning.

@Francois3d
Copy link

Sam here in Perth. Similar report as rover1955

@angdolf
Copy link

angdolf commented Jun 7, 2024

Same issue. 2024.6.0 workday sensor reports workday on on non workday. No issue on previous 2024.5.x.

@MachRat
Copy link

MachRat commented Jun 7, 2024

Same issue. This morning (Saturday) my workday sensor is on. I'm in Australia/Sydney.

@whiteboxgum
Copy link

Same issue. 2024.6.0 workday sensor reports workday on on non workday. No issue on previous 2024.5.x.
I am in Australia/Sydney.

@xsawa32
Copy link

xsawa32 commented Jun 8, 2024

Same problem here in Austria/Salzburg. Workday sensor today on Saturday is on. Saturday ist actually in exception list. also sunday and holiday

@as19git67
Copy link

I also see it today in Bavaria, Germany. Workday sensor today on Saturday is on. Saturday, Sunday and Holiday are in the exception list.

@WoMec
Copy link

WoMec commented Jun 8, 2024

I hade same issue today morning but right after update to 2024.6.1 workday sensor switched correctly.

probably fixed by this: #118414

@Lanstrom
Copy link

Lanstrom commented Jun 8, 2024

Arrgh. I'm in big trouble with my family. It's Saturday morning here in the UK and all my morning wake up alarms have just activated. It's worked perfectly for months. Saturday is in the exclude list but the sensor is ON.

If you don't hear from me again it's because I am buried under the patio ;-)

@cbrueser
Copy link

cbrueser commented Jun 8, 2024

Arrgh. I'm in big trouble with my family. It's Saturday morning here in the UK and all my morning wake up alarms have just activated. It's worked perfectly for months. Saturday is in the exclude list but the sensor is ON.

If you don't hear from me again it's because I am buried under the patio ;-)

Same issue for me

@KNXBroker
Copy link
Contributor

I think developers are aware about the issue 👍 almost everyone seems to have the problem . In the meantime I'm going to use an automation reloading the integration each day one time.

alias: Workday Reload
description: ""
trigger:
  - platform: time
    at: "01:00:00"
condition: []
action:
  - service: homeassistant.reload_config_entry
    target:
      entity_id: binary_sensor.workday_sensor
    data: {}
mode: single

@TomBrien
Copy link
Member

TomBrien commented Jun 8, 2024

For anyone looking to fix: I think in #116419 the time passed to update data has changed from dt_util.now() to dt_util.utcnow(). I won't be able to put in a PR for a couple of hours. I think this is an issue for anyone ahead of UTC.

@starschild86
Copy link

Same here with 2024.6.1 :\ I have to stop updating too soon or my girlfriend will kill me 😅

@balloob
Copy link
Member

balloob commented Jun 8, 2024

Everyone please stop commenting if you also have the issue and instead put a 👍 on the first post.

@m0wlheld
Copy link

m0wlheld commented Jun 8, 2024

I have two instances of workday binary sensor configured, on has an offset of one day (is tomorrow a workday).

While the one with offset got properly updated with HA 2024.6, the one without offset didn‘t.

@elchanly
Copy link

Solved upgrading to .4 🤩

@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.