andig / pimatic-fritz

Pimatic plugin for Fritz!Box SmartHome and FritzDect!200 Node
GNU General Public License v2.0
8 stars 6 forks source link

Show battery state of comet thermostat #29

Open mwittig opened 8 years ago

mwittig commented 8 years ago

See https://forum.pimatic.org/topic/2362/fritz-plugin-show-battery-state-of-thermostat

andig commented 8 years ago

Good idea. Do we have any battery widgets yet? Would probably be easier to implement those as two separate devices?

mwittig commented 8 years ago

We don't have a generic battery template, yet, but pimatic generally supports iconified attribute values. HomeduinoRFTemperature has a percentage and low battery gauge depending on what the sensor supports. https://github.com/pimatic/pimatic-homeduino/blob/master/homeduino.coffee#L709-L738

svenalbert commented 7 years ago

Don't know if it helps, but some weather station from the homeduino plugin have a battery symol implemented, just to show if batter ok / not ok

something like this

andig commented 7 years ago

Sounds good. I'll see what I can do when I have some time.

andig commented 7 years ago

@mwittig I've added a battery attribute like this plus setting it:

  # HomeduinoPlugin
  battery:
    description: 'battery status'
    type: 'number'
    unit: '%'
    displaySparkline: false
    icon:
      noText: true
      mapping:
        'icon-battery-empty': 0
        'icon-battery-fuel-1': [0, 20]
        'icon-battery-fuel-2': [20, 40]
        'icon-battery-fuel-3': [40, 60]
        'icon-battery-fuel-4': [60, 80]
        'icon-battery-fuel-5': [80, 100]
        'icon-battery-filled': 100

However it doesn't show. I'm still confused how Homeduino does ist as it does not seem to contain any UI templates itself?

andig commented 7 years ago

ping @mwittig any chance taking a quick look?

andig commented 7 years ago

Ping @mwittig still would need some help ;)

andig commented 7 years ago

ping @mwittig