the values of the target temperature can be accessed using temperature as well as current_temperature for the current temperature of a climate entity
it would be possible to use either events or create a fake eltako climate and set it using climate.set_temperature
eg. get the climate from tado using state_attr(‘climate.tado_smart_thermostat_su0658204416’, ‘current_temperature’) }} and state_attr(‘climate.tado_smart_thermostat_su0658204416’, ‘temperature’) }}
and either throw an event or set the temperature of a fake climate
basic home assistant example:
alias: Tado
description: Notify current temperature when a button is pressed
trigger:
- platform: device
device_id: 29214bf168d4e16d79746ce52d83d338
domain: button
entity_id: 7d64509ae89ba3dab5ce076ee1e51534
type: pressed
action:
- service: notify.mobile_app_ipad
data:
message: >-
The current temperature is {{
state_attr('climate.tado_smart_thermostat_su0658204416',
'current_temperature') }} and {{
state_attr('climate.tado_smart_thermostat_su0658204416', 'temperature') }} degrees
Celsius.
mode: single
I have added a basic function to the gateway to send arbitrary telegrams. Since each gateway can be used with a different base id, I added the service function for each of them.
# This example allows to send a telegram to turn on the light.
Service: eltako.gateway_1_send_message
Data:
id: FF-82-3E-04
eep: A5-38-08
Command: 1
You can find everything in this gist, the example in the gist can currently only be used for switchable lights and for setting the temperature.
Changed code at line 243 and 244 as well as 147 to 173.
Let me know your thoughts and if you have any questions.
Changed it a bit so that you don’t need to distinguish between the cases of EEPs. Meaning to say, you just specifies the arguments and it picks the right EEP. In the logs you can then see if something was missing:
@Vinnovic how did you get the position status working again?
I updated to v1.4 but its still showing opening/closing even after the shutter stopped. The percentage is show correct but status don’t switch to open.
But I copied the covers.py from the main manually over to HA before updating to v1.4 back then. But from my understanding on an update all the files will be overwritten?
Maybe I have to uninstall the eltako integration and reinstall it?
I removed all eltako entities, deleted the integration and rebootet HA.
Then I downloaded the integration again from HACS, installed it and rebootet.
Unfortunately the state still stays at closing/opening event though the roller shutter stops at the correct percentage and also the percentage is show correctly:
There is a merge mistake in it . I took over your corrected method in addition so we have now two times the same method but luckily it takes always the new and second one. That’s why tests worked and I haven’t recognized it. So it work and will be cleanup soon.
So often it would be much easier to have a type-safe language.
You changed the code to add an else, that may cause the cover position to show up as either 0 or 100 when stopping the cover mid flow, surely this will only happen once, after a full opening or closing it will be set.
The way i changed it without the else was more like this approach:
Your cover might be either 100% open or 100% closed at first launch, (there may be situations where the cover might be 50% closed or open, but i think this will happen rarely) therefore setting the value to 0 or 100 and calculate the position on top with:
may cause the cover to show up correct in most situations at first run, while the added else will cause the cover to show either fully opened or fully closed at first run, even when stopping the cover mid flow.
Thanks, I will change it back to your implementation. Could you please extend the tests so that I won’t change it back to a bad state.
I found also something which could explain the update problems although I’ve ignored it in the beginning completely and it worked anyways.
In the manifest I’ve forgot to increase the version number of the integration.
For me the documentation about cover states is not really clear. In which state is it when half-open? Other integrations use always open if it is not completely closed. Then also both buttons work.