-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Add support for ELV-SH-CTV Sensor to homematicip_cloud #143737
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
base: dev
Are you sure you want to change the base?
Conversation
@property | ||
def extra_state_attributes(self) -> dict[str, Any]: | ||
"""Return the state attributes of the tilt sensor.""" | ||
state_attr = super().extra_state_attributes | ||
|
||
state_attr[ATTR_ACCELERATION_SENSOR_NEUTRAL_POSITION] = getattr( | ||
self.functional_channel, "accelerationSensorNeutralPosition", None | ||
) | ||
state_attr[ATTR_ACCELERATION_SENSOR_TRIGGER_ANGLE] = getattr( | ||
self.functional_channel, "accelerationSensorTriggerAngle", None | ||
) | ||
state_attr[ATTR_ACCELERATION_SENSOR_SECOND_TRIGGER_ANGLE] = getattr( | ||
self.functional_channel, "accelerationSensorSecondTriggerAngle", None | ||
) | ||
|
||
return state_attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can these be changed? Can we make separate entities out of t 8000 hem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are just config values. Make separate entities anyway?
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Proposed change
Add support for ELV-SH-CTV Sensor to homematicip_cloud.
To reduce complexity i had to refactor the async_setup_entity function in sensor.py
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: