Closed badguy99 closed 3 years ago
It's actually not complicated! If you want to give it a shot:
device_state_attributes
to HomeConnectPowerSwitch
returning a dictionary (attribute name: attribute value)const.py
status
dictionary that you can access from that method like so: status = self.device.appliance.status
. (NB, this does not fetch any info from the API, it just reads the info that has already been fetched.)Hi all, someone can help me? I will try to have device attributes but I didn't understand how to configure, for me is good to have more sensor… Following some question:
I'm looking at this at the moment, but looking at the Home Connect docs, a different list of devices support remote control active status Vs remote control start allowed state, and I'm trying to cover all devices. I am thinking, as they are states, so read only items, not set-able, they may be best as sensors rather than switches, or switch attributes.
According to the docs, it's a boolean state, so it has to be a binary sensor, not a sensor (and certainly not a switch).
There need to be two binary sensors: one for BSH.Common.Status.RemoteControlStartAllowed
and one for BSH.Common.Status.RemoteControlActive
. It has to be set on each child class of HomeConnectDevice
which one of the sensors is present and then handled in the get_entity_info
method such that the sensors can be created in binary_sensor.py
. Probably best to rename HomeConnectBinarySensor
to HomeConnectDoorBinarySensor
and have a new child class for the two new sensors.
Hi David, Thanks for your answer, but I'm not a developer, is too complicate for me. Regards Ivan
Hi David,
I'm kind of in the same situation as zufivan. Is it possible to add the remote_control_active and allow status back in the home connect beta integration or even the core home connect integration? Or point me in a way to do it myself, since higher programming languages are not my strongest skill.
My goal is to control/start appliances like a dishwasher, washingmachine, ... on solar power. When my solar panels produce enough energy or a battery is full enough to carry the load of the appliances. Without the smart control status, I have to toggle a manual input_bool in HA every time I activate smart control, to simulate smart control.
Best regards, Quinten
I don't know if I'll have time for this, but if you want to give it a shot, here is how you could do it:
homeconnect
Python library and monitoring how the status
dictionary of a HomeConnectAppliance
changes when the appliance's state changes. api.HomeConnectDevice
named get_remote_control_sensors
or something like that which returns a list of dictionaries similar to what DeviceWithPrograms.get_program_sensors
doesDryer
, add the output list of get_remote_control_sensors
to the value of "sensors" in the output dictionary.Feel free to submit a work-in-progress PR along these lines, then I can help pointing you in the right direction.
Hi David,
I would love to do that, I allready tried for messing around with other integrations but I'm really lost with higher programming languages. Ask me anything about automation and building up a logic control in a low level language (PLC). But messing around in an API, working with python is like trying to read chinees.
I'm still thinking about this. But I'm also snowed under with the day job. Realistically I probably won't get to look at this properly for a while - probably until next year. Having said that, if it is still open next year, work have said they want to give us time for a hackathon again, so I might then get a week to work on it, instead of the day job...
Finally got the hackathon day at work - I've put up https://github.com/home-assistant/core/pull/45610 for review.
Partner issue to https://github.com/home-assistant/core/issues/38228
To add remote_control_active and remote_control_start_allowed sensors or switches.
I did have a look at the code to see if I could work out where to add it in and raise a pull request, but it was too complicated for me.