-
Notifications
You must be signed in to change notification settings - Fork 15
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
Miele washing machine #62
Comments
It's not your fault you've been unable to get the card to work with your washing machine. Based on these entities, there's no way to use the card without resorting to creating a template sensor. The card expects the start and end times to be full formatted dates—this way it can handle multi-day timers correctly. Your entities do not have dates in them, so a template sensor would need to insert the current date in front of the I'll write up more later. I need to refresh myself on how templates work. However, if you know the washing machine will always run for a set duration, you can use the |
Hi, thanks for helping. The duration can vary depending on the program etc. `template:
|
Thanks for writing what you have! You should only need sensor:
name: "Washing machine timer"
state: "{{ states('sensor.washing_machine_status_2') }}"
attributes:
start_time: "{{ now().strftime('%Y-%m-%dT') + states('sensor.washing_machine_started_at') }}:00"
end_time: "{{ now().strftime('%Y-%m-%dT') + states('sensor.washing_machine_finish_at') }}:00" |
Wonderful! I'm glad it works! I'll add Miele to the list of integrations on the readme. Also since the washing machine runs for over an hour, I'd recommend you give the remaining time some more space with the |
Hello, here a tested and working template for using a Miele tumbler dryer together with the Miele integration: In sensors.yaml: - platform: template
sensors:
trockner_timer_3:
value_template: "{{ states('miele.trockner') }}"
attribute_templates:
start_time: "{{ now().strftime('%Y-%m-%dT') + states.sensor.trockner_status.attributes.kickoffTime + ':00' }}"
end_time: "{{ now().strftime('%Y-%m-%dT') + states.sensor.trockner_status.attributes.finishTime + ':00' }}" Here the configuration for the card itself: type: custom:timer-bar-card
entity: sensor.trockner_timer_3
name: Trockner
active_state: In Betrieb
icon: mdi:tumble-dryer
debug: false
guess_mode: false
text_width: 4.5em
bar_radius: 4px
bar_width: 40% Maybe someone can help me with formatting it correctly for Github, so everybody simply can copy it :-) |
@Razsmithii thank you for posting the template and config! I've edited your comment to include the code block formatting. |
Hello, when I create the following sensor: - sensor:
- name: "washing_machine_timer"
state: "{{ states('sensor.washing_machine_status') }}"
attributes:
start_time: "{{ now().strftime('%Y-%m-%dT') + states('sensor.washing_machine_starte_um') }}:00"
end_time: "{{ now().strftime('%Y-%m-%dT') + states('sensor.washing_machine_ende_um') }}:00" I get the following error message: Logger: homeassistant.config
Source: config.py:505
First occurred: 10:22:18 (1 occurrences)
Last logged: 10:22:18
Invalid config for [template]: expected a dictionary for dictionary value @ data['sensor'][0]['attributes']. Got None extra keys not allowed @ data['sensor'][0]['end_time']. Got "{{ now().strftime('%Y-%m-%dT') + states('sensor.washing_machine_ende_um') }}:00" extra keys not allowed @ data['sensor'][0]['start_time']. Got "{{ now().strftime('%Y-%m-%dT') + states('sensor.washing_machine_starte_um') }}:00". (See /config/configuration.yaml, line 232). Can anyone give me a tip? |
It looks like it might be an error with the indentation? |
BTW this doesn't quite work when the start time and end time cross a date boundary (which is exactly why it's a mistake for Miele to only include the "local time" portion of the full timestamp :). Luckily, this can be detected by looking at the elapsed time, but that does cause the template sensor to be be updated by HA every minute, which kind of sucks but not the end of the world :). |
Hi, I've tried to get a progress bar for my Miele washing machine. But I've been unable to get it to work.
Are you able to help me to figure it out? I've tried creating a template sensor but I was unable to get it to work.
The remaining/duration is in minutes, and the start and endtime is in hh:mm.
The text was updated successfully, but these errors were encountered: