FlyingDiver / Indigo-Shims

Plugin for Shim devices, primarily for use with the MQTT plugin
The Unlicense
1 stars 1 forks source link

Feature request #26

Closed berkinet closed 2 years ago

berkinet commented 2 years ago

Might it be possible to add arbitrary labeling of the Battery, Energy, & Power UI items? This would allow them to be better used to display other key states. For example, my sprinkler controller sends the current water flow rate and the total water used. I am now displaying them as Energy (total) and Power (rate). It works, but isn't very pretty. I saw in the Indigo forums that these custom states were added to avoid creating a one-off custom plugin and I am of the same mind. Thanks for considering it.

FlyingDiver commented 2 years ago

That pop-up controls two things - the sensor state image in the Indigo UI, and the format of the UI value. I can't think of any good way to let the user select the state image. I could allow the user to specify the format string to use for the uiValue, but if they mess it up it'll break the value update.

It would be easier to just add a few more options to the list. Just let me know:

  1. Sensor subtype (name for list)\
  2. State Image from indigo.kStateImageSel list at https://wiki.indigodomo.com/doku.php?id=indigo_2022.1_documentation:device_class&s[]=kstateimagesel#device_base_class
  3. Format (units, etc) for the uiValue
berkinet commented 2 years ago

On second, and third, thought. This may be a bad idea. First, this device is defined as an electrical power switch, and I am already mis-using that. Then, for every state that a user wants, someone else will want something else, different. It is probably better to just let the user expose the desired states in a control page. On the other hand, should you at some type create a sprinkler type, then flow rate and volume might make sense. Or, make the Shim devices/sensor-types somehow temptable.

On 26 Oct 2022, at 18:53, Joe Keenan @.***> wrote:

That pop-up controls two things - the sensor state image in the Indigo UI, and the format of the UI value. I can't think of any good way to let the user select the state image. I could allow the user to specify the format string to use for the uiValue, but if they mess it up it'll break the value update. It would be easier to just add a few more options to the list. Just let me know:

Sensor subtype (name for list)\ State Image from indigo.kStateImageSel list at https://wiki.indigodomo.com/doku.php?id=indigo_2022.1_documentation:device_class&s[]=kstateimagesel#device_base_class https://wiki.indigodomo.com/doku.php?id=indigo_2022.1_documentation:device_class&s%5B%5D=kstateimagesel#device_base_class Format (units, etc) for the uiValue — Reply to this email directly, view it on GitHub https://github.com/FlyingDiver/Indigo-Shims/issues/26#issuecomment-1292331515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZLU4L5MEEROQXE5ZVPHL3WFFOXBANCNFSM6AAAAAARO7PFFQ. You are receiving this because you authored the thread.

FlyingDiver commented 2 years ago

Yeah, there's too many possibilities to code for all of them. In your case, I might actually do two devices - one relay type for on/off control of the valve, and a generic device to show the state info you're getting back.

berkinet commented 2 years ago

Actually, as I am already capturing the entire state array, all I have to do is turn off the special treatment for those two variables, and they will show up in the device state list. Then, as I have already declared the device as an on off switch, I get the functioning I want. So, all nicely done in one device. On 26 Oct 2022, at 20:56, Joe Keenan @.***> wrote: Yeah, there's too many possibilities to code for all of them. In your case, I might actually do two devices - one relay type for on/off control of the valve, and a generic device to show the state info you're getting back.

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