Giter Club home page Giter Club logo

Comments (8)

FutureGUIs avatar FutureGUIs commented on June 15, 2024

yeah I think a select/dropdown would be more useful

from apex-ha.

itchannel avatar itchannel commented on June 15, 2024

So I've been looking and going to try using a select entity as you guys mentioned https://developers.home-assistant.io/docs/core/entity/select

I'll try and draft up something this week, just in the Aussie outback at the moment so reception is limited 👍

I'll also leave the switches in place for now.

from apex-ha.

brettonw avatar brettonw commented on June 15, 2024

yeah I think a select/dropdown would be more useful

I think this is true if you simply want to replace the Apex Fusion dashboard with a HA dashboard that functions exactly the same way, but I disagree in other cases. I want better functionality than Apex provides. My feeling is that the ON aspect of the Apex switches has no semantic usefulness to Home Assistant. Any abstraction other than OFF/AUTO (such as a dropdown/select) will require the user to build input_* helpers to get their intended use case.

In my proposal, if you really want OFF/ON functionality, you could set the Apex switch 'Control Type' to 'Always' and 'State' to 'On' in Apex Fusion, and then it really is just a binary switch (because setting that switch to AUTO on the apex will result in it being on).

On my HA dashboard, I want an OFF/ON switch for most of my devices, but that doesn't mean OFF/ON at the apex:

  • For "variables", I just want them set to AUTO on the Apex because OFF and ON are really just 0 and 100, respectively. I use the set_value service call to change their value. I do this with my Kessil refugium light, for instance. The color variable is just always set to auto on the Apex, and I expose an input_number (slider) to the dashboard. Same with the brightness. My day/night automation adjusts the brightness variable on a sinusoidal cycle (opposed to the tank light). If I turn the switch to off on the HA dashboard, I stop HA from setting the variable to my program value, but I don't interrupt the HA automations.

  • For my Sicce return pump, I expose an input_boolean that toggles the Apex switch OFF/AUTO, and all my automations use the set_value service to set the pump speed. Setting the pump speed to 0 effectively turns it off.

  • For the heater, I expose an input_boolean that toggles the Apex switch OFF/AUTO. In AUTO mode, the Apex runs the heater program that toggles the actual heater on and off depending on the temperature probe reading.

For these OFF/AUTO toggles, turning off the apex switch allows me to keep HA automations running, but have no affect. For instance, I have an automation that will turn on the return pump if it's been off for 10 minutes (feeding mode). But during a water change I don't want to turn the return pump back on in the middle of it. Since the return pump automation is only manipulating the pump speed variable, the switch between OFF/AUTO is similar to going into HA->settings->automations and turning off/on that HA automation.

from apex-ha.

brettonw avatar brettonw commented on June 15, 2024

I'll try and draft up something this week, just in the Aussie outback at the moment so reception is limited 👍

No hurry - this is a hobby. Enjoy where you are. Will you be able to visit the Great Barrier Reef?

from apex-ha.

brettonw avatar brettonw commented on June 15, 2024

FYI, I implemented this in my fork, and I've been very happy with the result.

https://github.com/brettonw/apex-ha

from apex-ha.

itchannel avatar itchannel commented on June 15, 2024

I'm back so will take a look at all the issues and the suggested changes you've made and look at merging some bits in this week.

from apex-ha.

FutureGUIs avatar FutureGUIs commented on June 15, 2024

@brettonw Coming back to this, I'm definitely leaning to your view now that the controls should be 'OFF/Auto' because yeah, I want to override things from HA, but generally leave things in Auto mode on the Apex side since that has direct local control and the failsafes in place.

from apex-ha.

brettonw avatar brettonw commented on June 15, 2024

@FutureGUIs I haven't submitted a pull request to this repos on my changes because I rewrote a lot of it to work the way I wanted and it's not backwards compatible with this integration. If you wanted to try it out, I'd be curious about feedback from my repos (linked above).

from apex-ha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.