HomeAssistant-Tapo-Control
HomeAssistant-Tapo-Control copied to clipboard
Feature Request: Create separate entities for configuration/Replace some services with switches, buttons and selects.
Is your feature request related to a problem? Please describe.
This is less of a feature request and more of a suggestion.
Recently I've used a camera from another manufacturer and noticed there were a lot of entities in the device, which are great for controlling through the UI:
Describe the solution you'd like Currently a lot of the camera controls are only accessible through service calls, which is fine for automations but makes it harder to change settings on the fly or see which setting is on at the time.
Some services could be replaced by switches:
- tapo_control.set_privacy_mode
- tapo_control.set_alarm
- tapo_control.set_led_mode
- tapo_control.set_auto_track_mode
- tapo_control.set_alarm_mode
Some could be a button:
- tapo_control.format
- tapo_control.reboot
- tapo_control.synchronize_time
These a select:
- tapo_control.set_motion_detection_mode
- tapo_control.set_day_night_mode
Describe alternatives you've considered Usually I check the dev tools to see all atributes easily and then do the service calls or just go straight to the app.
Additional context
I used "replace" a lot, but there's no reason for removing services and turning this into a breaking change.
If we would be doing this i would prefer a breaking change since it will be less code to maintain and cleaner.
That being said, I was thinking of this in the past and doing this introduces more code and more possible bugs. Most if not all these entities can be created by users using template and we could add more examples into the readme.
That also being said, I am not against it and if someone wants to refactor the code, implement this and open PR I will accept it. It is ultimately a lot more user and beginner friendly. It's just not a priority for me right now as it can be fairly easily achieved. It would be a nice to have for a future.
@JurajNyiri i'm working on this at the moment, i think you will get a PR very soon :wink: :grin:
it escalated a little bit :see_no_evil:
Released in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/4.0.0 .
@JurajNyiri tell me if I have such a structure in my yaml file
script:
tapo_camera_3_otvernis:
alias: Камера гостиная Отвернись
sequence:
- service: tapo_control.ptz
data:
entity_id: camera.tapo_camera_3_sd
preset: 1
Do I understand correctly that these services will not work?
Yes you do. You need to replace this with the select service and the related preset selector. Refer to the select integration of Home Assistant. You will also need to replace 1 with the name of preset.
You can also find an example for this in Lovelace examples in this repo.