itchannel / apex-ha

Local Neptune Apex HA Integration (Aquarium Controller)
GNU General Public License v3.0
19 stars 3 forks source link

Read only mode #45

Open lyonsad opened 5 months ago

lyonsad commented 5 months ago

Is there a way to make this integration read only? Make it so it reads the value of sensors and switches but cannot change them? This would be a useful config option.

brettonw commented 5 months ago

I don’t think doing this at the integration level is consistent with home assistant’s design philosophy. If you really want to, you could create a helper entity that is a read-only copy of any value you want, something like this: https://community.home-assistant.io/t/copy-value-of-sensor/335261On Feb 11, 2024, at 10:47 AM, lyonsad @.***> wrote: Is there a way to make this integration read only? Make it so it reads the value of sensors and switches but cannot change them? This would be a useful config option.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

lyonsad commented 5 months ago

I hear what you are saying and the "right" place to implement this would be on the apex system itself. But since you can only have the one local user and they are admin you cant create a read only user to use for the automation.

My reasoning for wanting this function is pretty simple. I know how to do what is suggested, and use that as a way to monitor switch states. The challenge I have is these entities still exist in HA, and as such are still vulnerable to accidental or malicious changes. Examples could be accidental de-activation through targeting the wrong entity in an automation, someone in my home going to the wrong dashboard where all entities are listed, a hacker getting access to my HA, etc.

Thanks for your consideration and for the integration in general.

brettonw commented 5 months ago

I have my HA instance connected through homekit, and have had my father mischievously turning off everything in the house using Siri, so I understand what you are concerned about.

the Apex apps have the guards on some controls to prevent accidental changes, but that is entirely implemented in the app, not the Apex itself.

If you aren’t actually interested in controlling your tank through HA, another approach would be to fetch the status JSON and report the values you want. If memory serves, this doesn’t even require authentication.

some examples are online, like https://forum.neptunesystems.com/showthread.php?31648-Guide-to-show-Apex-data-in-Home-Assistant

I don’t think they are aware of the integration’s existence.