-
Notifications
You must be signed in to change notification settings - Fork 518
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
Add support for PlantsIO Ivy smart planter #2069
Conversation
05c29c6
to
fd88de4
Compare
secondary_entities: | ||
# Sensor entities | ||
- entity: sensor | ||
name: Ambient light |
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.
Suggest to remove this name, so that pre-defined translations can be used.
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.
When I do that all my sensors have no names:
And I end up getting entity IDs like:
sensor.smart_planter
sensor.smart_planter_2
sensor.smart_planter_3
Am I doing something wrong?
This is my current code for the illuminance sensor:
- entity: sensor
class: illuminance
dps:
- id: 103
type: integer
name: sensor
unit: lx
class: measurement
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.
This is maybe a recently introduced bug due to a side effect of the fix for #1856. It may be better for me to revert that change.
Unfortunately this was difficult to detect, as existing entity names do not change once they are setup, only newly added ones are affected.
unit: lx | ||
class: measurement | ||
- entity: sensor | ||
name: Temperature |
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.
Definitely remove the names that are the same as class
- value: "Unknown state" | ||
- entity: sensor | ||
name: Humidity status | ||
class: enum |
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.
Sensors with only two states could maybe be made into binary_sensor instead, especially if there is a relevant class defined for binary_sensor.
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.
I would expect there to be multiple states from the "AI" derived sensors.
e.g. Good, Dry, Too humid, Too dry
However I have no been able to determine all the values in my environment, and as I see with Light status enum the values are not in order so I don't want to guess.
The developers seems to had expressed interested in home assistant status, so I have emailed them to see if they are willing to share the mapping.
custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml
Outdated
Show resolved
Hide resolved
type: boolean | ||
name: switch | ||
- entity: number | ||
name: Brightness |
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.
Is this a light?
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.
This is the display brightness.
- fix most enums to use integer instead of bitfield - use volume_storage class for water level - add absorbing state to water status - add initilizing states from missing enums - use binary_sensor entity and battery_charging class for charging status - convert plant in pot to binary_sensor - add not selected enum for plant type - add config options for weather and weather location
I have added a commit with the following changes:
I haven't made the change regarding the names of known class types due the issue I am seeing and I will wait for your feedback. |
There seems to be some issue with this change as I now have an error in the logs:
The entry:
|
- remove unnecessary names to allow translations to be used - fix use of binary_sensor - remove inappropriate class - use target language for language names - use light entity for display brightness
This PR adds the PlantsIO "Ivy" Smart Planter.
Info on the device:
https://www.indiegogo.com/projects/plantsio-ivy-smart-flowerpots-endless-fun#/
https://smartplantivy.com/
Available on Amazon and AliExpress. Lots of drop shippers using various brand names.
Datapoints documented at https://gist.github.com/thewade/ef9f6014f13932bd2e77d43331e2027d
This device has a ton of sensors and config options. I haven't got them all the config done, and some enum data needs to be reverse engineered to be mapped.
Some settings like brightness should be restricted when auto brightness is on, but I wasn't able to figure out if it was possible using constraints and conditions.
I expect another PR in the future to fill in the missing details as well as constraints and conditions if they are possible, but I need a break for now.