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

waiting_state and start_time { entity } config showing "Invalid Date" #131

Open
gwilford opened this issue Mar 11, 2024 · 2 comments
Open

Comments

@gwilford
Copy link

Describe the bug
"Invalid Date" is displayed instead of the start time while in waiting state:

Bosch Dishwasher - Operation state         Delayed Start Invalid Date

Both start_time and end_time entities are defined and are of type device_class: timestamp:

2024-03-12T00:06:39+00:00
2024-03-12T02:25:06+00:00

Is the start_time entity config being ignored or overriden by the main entity state/start_time attribute?

Your card configuration

type: custom:timer-bar-card
entities:
  - sensor.402100530466009091_bsh_common_status_operationstate
active_state: BSH.Common.EnumType.OperationState.Run
waiting_state: BSH.Common.EnumType.OperationState.DelayedStart
icon: mdi:clock-end
start_time:
  entity: sensor.dishwasher_delayed_start_time
end_time:
  entity: sensor.402100530466009091_bsh_common_option_remainingprogramtime
debug: true
translations:
  BSH.Common.EnumType.OperationState.Ready: Ready
  BSH.Common.EnumType.OperationState.Finished: Finished
  BSH.Common.EnumType.OperationState.DelayedStart: Delayed Start
  BSH.Common.EnumType.OperationState.Run: Run

Debug information

State: BSH.Common.EnumType.OperationState.DelayedStart (state mode = waiting)
Mode: waiting (auto mode = N/A, unused)
Duration: 8307 second
Time remaining: 11140.116
Counter: 11140.116
Did you set active_state? Attr: {"device_class":"home_connect_alt__status","icon":"mdi:gauge-full","friendly_name":"Bosch Dishwasher - Operation state"}
@gwilford
Copy link
Author

I'm now pretty sure the start_time entity config is being ignored/overriden as the following sensor template causes the card to work as expected, i.e. shows the delayed start time when in waiting mode:

      - name: Dishwasher state
        state: >
          {{ states('sensor.402100530466009091_bsh_common_status_operationstate') }}
        attributes:
          start_time: >
            {% set relhm = states('sensor.402100530466009091_bsh_common_option_startinrelative') %}
            {{ (now() + as_timedelta(relhm + ":00")).isoformat() }}
          end_time: >
            {{ states('sensor.402100530466009091_bsh_common_option_remainingprogramtime') }}

with this simplified config:

type: custom:timer-bar-card
entities:
  - sensor.dishwasher_state
active_state: BSH.Common.EnumType.OperationState.Run
waiting_state: BSH.Common.EnumType.OperationState.DelayedStart
icon: mdi:clock-end
translations:
  BSH.Common.EnumType.OperationState.Ready: Ready
  BSH.Common.EnumType.OperationState.Finished: Finished
  BSH.Common.EnumType.OperationState.DelayedStart: Starting at
  BSH.Common.EnumType.OperationState.Run: Run

Hope this helps...

@rianadon
Copy link
Owner

You're right! Thanks for digging into this. The waiting state is using the attribute instead of the entity.

I'll fix this for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants