Advertisement
philippzbornik

Helper

Feb 21st, 2025
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Helper for remaining time dishwasher:
  2. {{as_local(as_datetime(states('sensor.siemens_sn758x46te_68a40e40caf6_bsh_common_option_remainingprogramtime'))) | as_datetime | as_timestamp | timestamp_custom('%H:%M')}}
  3.  
  4. Helper for remaining time dryer:
  5. {% set sensor1_time = as_local(as_datetime(states('sensor.siemens_wt7yh701_68a40e2a760e_bsh_common_option_remainingprogramtime'))) %}
  6. {% set sensor2_value = states('sensor.siemens_wt7yh701_68a40e2a760e_laundrycare_dryer_option_wrinkleguard') %}
  7. {% set minutes_to_add = (sensor2_value | regex_findall_index('(\d+)') | int) if sensor2_value != 'off' else 0 %}
  8. {{ (sensor1_time + timedelta(minutes=minutes_to_add)) | as_timestamp | timestamp_custom('%H:%M') }}
  9.  
  10. Helper for remaining time washing machine:
  11. {{as_local(as_datetime(states('sensor.siemens_wm14ve43_68a40e726c66_bsh_common_option_remainingprogramtime'))) | as_datetime | as_timestamp | timestamp_custom('%H:%M')}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement