Giter Site home page Giter Site logo

bramstroker / homeassistant-powercalc Goto Github PK

View Code? Open in Web Editor NEW
891.0 13.0 249.0 12.83 MB

Custom component to calculate estimated power consumption of lights and other appliances

License: MIT License

Python 98.93% Dockerfile 0.11% Shell 0.06% TypeScript 0.90%
hue-lights consumption power homeassistant hacs energy-monitor hacktoberfest home-assistant metering

homeassistant-powercalc's Introduction

Version Downloads Contributors hacs_badge hacs installs Code style: black Code style: black Coverage Status Sonar quality gate BuyMeACoffee

⚡ PowerCalc: Home Assistant Virtual Power Sensors

PowerCalc is a custom component for Home Assistant to estimate the power consumption (as virtual meters) of lights, fans, smart speakers and other devices, which don't have a built-in power meter. The consumption of light entities is calculated using different strategies to estimate the power usage by looking at brightness, hue/saturation and color temperature. For other entities a generic calculation can be applied, based on the attributes relevant for that entity.

Also a measure utility is included which allows user to measure their lights and other devices and contribute power profiles to the PowerCalc library.

Preview

"Buy Me A Coffee"

Go to the Quick Start for installation instruction.

homeassistant-powercalc's People

Contributors

alvinchen1 avatar bramstroker avatar ca-dmin avatar clockwerx avatar cm000n avatar dansie avatar ejpenney avatar el97 avatar ffm777 avatar garulf avatar github-actions[bot] avatar gribber avatar ibebarrett avatar knudsvik avatar krzysztofhajdamowicz avatar magnusoverli avatar marcgeurts avatar marthubner avatar matteobreschig avatar misa1515 avatar mtrab avatar naamah75 avatar nepozs avatar palminx avatar pantastisch avatar renovate[bot] avatar rubenkelevra avatar smonesi avatar stefangries avatar whi-tw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-powercalc's Issues

Many models have missing standby_power

I can suggest to correct model.json files (when it is unknown) to 0.4W (as it has quite high probability to be closest to real standby power).
When more measurements will be ready it will be easier to predict real standby power as the same generation of Zigbee modules sholud have close power draw.

Multiply Factor not applied to standby usage

When using multiply_factor, standby_usage is not multiplied with the factor when the lights are off. (at 0%)
Instead it will be shown with the stand by usage of a single bulb.

...data/signify/LTG002/model.json:

{
"name": "Hue White Ambience Spot GU10",
"supported_modes": [
    "linear"
],
"standby_usage": 0.4,
"linear_config": {
    "min_power": 1.2,
    "max_power": 5
},
"measured_method": "manual",
"measure_device": "From manufacturer specification and a bit of guessing ;)"
}

configuration.yaml:

 sensor:
  - platform: powercalc
    entity_id: light.entrance
    manufacturer: signify
    model: LTG002
    multiply_factor: 3

When on and at 100% it correctly reports 15W as the power usage. But when the lights are of it only shows 0.4W instead of 1.2W.

Version: 0.4.3
(I don't think the issue has been introduced with this version, but has been present at least since 0.4.2.)

Power consumption does not show up for Sonos

Hi!

I've added a powercalc sensor for my sonos, but it never shows up in hass. I've tried both fixed and state-dependent values with no luck:

- platform: powercalc
  entity_id: media_player.living_room_sonos
  fixed:
    power: 5
- platform: powercalc
  entity_id: media_player.living_room_sonos
  fixed:
    states_power:
      playing: 5.1
      idle: 4.9
      paused: 4.9

After restarting home assistant, all other powercalc entities show up. However, the Sonos one is nowhere to be found. I don't see any errors in home-assistant.log either.

Versions:

  • Home Assistant Core 2021.8.7
  • Powercalc 0.3.0

Autodiscovered light now failing even with fixed as mode

This entity used to work but after a recent update is failing to create the power entity.

  - platform: powercalc
    entity_id: light.color_temperature_light_1   # Pantry WW/CW LED Strip
    standby_usage: 1.8
    fixed:
      power: 8.8

Logs:

2021-08-30 22:05:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] Auto discovered Hue model for entity light.color_temperature_light_1: (manufacturer=GLEDOPTO, model=GL-C-006)
2021-08-30 22:05:35 INFO (MainThread) [custom_components.powercalc.sensor] Model not found in library light.color_temperature_light_1: ('Model not supported', 'GL-C-006')

The autodiscovery is correct but the creation should not fail as I am specifying a fixed mode. Same thing if linear is used. The failure should only occur if LUT is specified or nothing is specified.

Support for vacuum devices

Just like media player, it would be great to have vacuum entities with two states: idle and charging.

Thank you in advance

No lookup file found for mode XY

Hi,

I just created a sensor for one of my hue lamps. Because it is managed by deconz I added manufacturer and model as follows:

  - platform: powercalc
    entity_id: light.piantana
    manufacturer: signify
    model: LCT010

But when I reboot I found this message in logs:

Skipping sensor setup light.piantana: ('No lookup file found for mode', 'xy')

This is a device that you currently use so I was wondering why in my case is asking this values, And on top of it how can I fix it?

Question re: testing new bulb

Hi,
I want to contribute the lookup table for a Hue hulb. It is a LWB006 which is a white only dimmable bulb. https://huehomelighting.com/key-differences-1st-2nd-3rd-gen-philips-hue-bulbs/

I have measured using this https://reductionrevolution.com.au/products/plug-in-power-meter

The values I thought unusal as they aren't linear but they are repeatable. I have measured two bulbs and there was some slight differences and I am planning to just go with the maximum value measured for each dim value (0-100).

Are you happy for me to just put in a PR you do you want to see some more details of my measurements first?

Unknown state_class of powercalc entities

Due to new possibilities HA available in 2021.08.0 and later version, it is possible now to use internal long-term statistics, but entities must have defined state_class as measurement.
https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics
https://www.home-assistant.io/more-info/statistics/
https://www.home-assistant.io/lovelace/statistics-graph/

It is of course possible to create in customize.yaml declarations like this

sensor.ct_kulka_e14_power:
  state_class: measurement

or using GUI menu Configuration -> Customizations,
but I think this should be a part of powercalc integration.

FR: Integrated measuring

I have no idea how hard it would be to implement but it seems logical that powercalc would use home assistants built in features to change lights to different brightness, temperature and colour while getting usage from a built in power meter integration...

By the way the script works fine with a shelly 1 PM allthough it requires a quite long delay (approx 10s) after changing the value before the wattage is updated (lots of signify lamps incoming :))

HA not able to restart when Power calc version 0.2xx

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/powercalc/strategy_linear.py:55
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:29:09 (1 occurrences)
Last logged: 13:29:09

[139648910454256] 'type' object is not subscriptable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/hassio/init.py", line 505, in async_handle_core_service
errors = await conf_util.async_check_ha_config_file(hass)
File "/usr/src/homeassistant/homeassistant/config.py", line 904, in async_check_ha_config_file
res = await check_config.async_check_ha_config_file(hass)
File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 212, in async_check_ha_config_file
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 498, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 503, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/powercalc/init.py", line 28, in
from .strategy_linear import LinearStrategy
File "/config/custom_components/powercalc/strategy_linear.py", line 18, in
class LinearStrategy(PowerCalculationStrategyInterface):
File "/config/custom_components/powercalc/strategy_linear.py", line 55, in LinearStrategy
def get_min_calibrate(self, value: int) -> tuple[int, float]:
TypeError: 'type' object is not subscriptable

powercalc's entity_id should be generated from sensors' entity_id

while adding binary_sensors for my devices (mentioned in #107) I've noticed strange behaviour and I am not sure if it's a bug or feature. best way to describe this is by example:

  • let' say my sensor's entity_id is binary,sensor.2_office_desktop
  • friendly_name is PJ's computer
  • when I create powercalc sensors, I was hoping that it's entity_id's would be sensor.2_office_desktop_energy and sensor.2_office_desktop_power but instead of this, they are: sensor.pj_s_computer_energy and sensor.pj_s_computer_power
  • I tried to add "name" attribute, but all this does is setting the friendly_name [displayed name] of the new sensors. entity_ids remains the same as above

should it work like this or something's wrong?

I have a specific naming template in my config (something like: domain.level_room_device_optional-attribute) so I can automate my config and lovelace dashboard with wildcards - it's obvious that right now powercalc sensors won't work with that as my friendly_names are different from naming template, and also sometimes quite long.

is it possible to add an option to create entity_id from entity_id? (that optional setting will prevent breaking change to people who already use the "entity_id from name" scheme).

Unsupported color mode rgb

Hi, I’m trying to make LUT files for my Yeelight bulbs. The integration supports color_temp, hs, and rgb modes. I tried making the rgb.csv table with a format of bri,r,g,b,watt, but fell flat when powercalc realised it doesn’t know what this rgb business is about. 😅

2021-07-13 14:34:30 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /home/ha-arcana/.homeassistant/custom_components/powercalc/data/yeelight/YLDP06YL/color_temp.csv.gz
2021-07-13 14:34:30 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /home/ha-arcana/.homeassistant/custom_components/powercalc/data/yeelight/YLDP06YL/hs.csv.gz
2021-07-13 14:34:30 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /home/ha-arcana/.homeassistant/custom_components/powercalc/data/yeelight/YLDP06YL/rgb.csv.gz
2021-07-13 14:34:30 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.arcana_shelves: Unsupported color mode rgb

If you can add RGB, I should be able to get this to work. Perhaps having some logic to convert HS table values into RGB would a useful way to do it? Once LUTs are working for this bulb, I can add mine into the repository.

Possible to Use a Sensor as the entity

I would like to be able to configure a sensor as the entity. I quite frequently create a "true state" entity as a template sensor so that i can actually track a device. For example - the playstation 4 integration will have a state "playing" when you are watching something on netflix as well as playing a game. But the device will consume different power depending on what you are doing.

Below is an example of the type of template sensor I would create and would like to monitor:

    playstation_4_state:
      value_template: >-
        {% if state_attr('media_player.playstation_4', 'media_content_type') == 'game' %}
          gaming
        {% elif states('media_player.playstation_4') == 'standby' %}
          rest
        {% elif states('media_player.playstation_4') == 'idle' %}
          menu
        {% else %}
          off
        {% endif %}

Increase round_digits to 4 for energy sensors

Energy sensors are created with round_digits=2 in the code (no configuration option) but I think that 4 digits will allow for more frequent updates in case a low-wattage items (eg. items in standby). Although I believe the overall calculation will be the same in the long term, having more frequent updates allows for better real-time graphs.

You can see the difference here (I changed to 4 digits at 10:30):

Screenshot 2021-08-22 at 19 15 29

Another possibility is to make it configurable (overall or per-sensor) but it might be overkill.

If you have global settings, you loose all friendly names

If you define:

sensor.system_fritzbox:
   friendly_name: "FRITZ!Box Router"
   icon: mdi:router-wireless

And

powercalc:
  scan_interval: 00:01:00

sensor:
  - platform: powercalc
    entity_id: sensor.system_fritzbox
    fixed:
      power: 9.8

Device name to pick in energy dashboard:

FRITZ!Box Router energy

becomes:

sensor.system_fritzbox_energy

Entities manually configured in configuration.yaml are not recognized by powercalc

Hi guys

I have 5 switch entities and 2 light entities configured manually in my configuration.yaml, but none of them the electrical consumption sensor works only in auto-discoveries.

This is an example of a part of my configuration and my problem:

switch in configuration.yaml:

 - platform: mqtt
    name: Central Cozinha
    state_topic: "mr2/status"
    command_topic: "mr2/cmd"
    payload_on: "1"
    payload_off: "0"
    state_on: "1"
    state_off: "0"

sensor in configuration.yaml:

 - platform: powercalc
   entity_id: switch.central_cozinha
   standby_usage: 0.6
   fixed:
     power: 36.9

Log:

2021-07-20 17:28:51 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up powercalc platform for sensor
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 250, in 
_async_setup_platform
    await asyncio.shield(task)
  File "/home/homeassistant/.homeassistant/custom_components/powercalc/sensor.py", line 120, in async_setup_platform
   entity_name = entity_state.name
AttributeError: 'NoneType' object has no attribute 'name'

What should i do to solve this problem? I thank the attention.

Sorry for formatting the codes, I had problems with formatting the text here.

Measuring script (measure.py) and files.csv - possible improvements

As mentioned in #45 (improper place) I think, that there are possible improvements

I think I will make the mode a use input (same as the light selection), that way the user can select the correct mode when starting the script. What do you think?

It will be great option - I've unintentional changed code many times by missclicks :D

I will also add the standby usage to the script.

It would be great, because every model has power draw between 0,3W and 0,5W so it is slightly more than 0W (in case using multiple lights total will be quite more).

I have some thoughts about optimization in script (eg. in HS mode mired step could be bigger, but britghness step sholud probably be lower) , but I have to analyze more .csv files
It looks like the maximum brightness could be 255 and it would be better to find the matching values so that the script ends up using the highest brightness (like many users use lights in reality).
Maybe the finished .csv files can also be optimized post factum (it depends on the algorithms used by the integration) - I think it would be enough to cut out a few lines containing the same power values, but apart from the first and last in the series.

Ikea models need directory mappings

I've found model where it is impossible to create proper folder name (it is Ikea candle/chandelier bulb E14)

Model not found in library light.swiecowa_e14_sypialnia: ('Model not supported', 'TRADFRI bulb E14 W op/ch 400lm')

But I've also found that Ikea uses unique type designation - it is printed only (on bulb and box) - for TRADFRI bulb E14 W op/ch 400lm it is LED1649C5
I've included this designation also before (adding other Ikea models), so it can be useful for others model also, and maybe other brands.

Feature Request: Add Climate as a tracked entity

I'd like to use this integration to track the energy consumption of my heated bathroom floor - I know the wattage, the only thing missing is to be able to use a climate entity attribute (not just the state) to track when the heating is on.

Here are the attributes of the entity, all I need to to track that heat has changed to "ON":

vac_modes: off, heat
min_temp: 5
max_temp: 30
target_temp_step: 1
preset_modes: none, hold, program
current_temperature: 23.5
temperature: 15
preset_mode: hold
child_lock: null
current_heating_setpoint: 15
deadzone_temperature: null
heat: OFF
linkquality: 66
local_temperature: 23.5
max_temperature_limit: 45
preset: hold
sensor: OU
system_mode: heat
friendly_name: Bathroom Floor
icon: mdi:radiator
supported_features: 17

Btw what you've done here really should be integrated directly into the new Energy dashboard and built into HA... (not for you to fix :)

Feature Request: Simulate power fluctuation to integrate better into ne energy integration

I mainly want to use this component to integrate my devices to the energy integration if they haven't energy measurements built in. So the workaround is like using this component, feeding them into the Riemann integral integration and feeding that integral integration into a utility meter.

Now the problem is: The Riemann integration only calculates the integral if the state of the underlying sensor changes. This can have issues if using the fixed mode with a device that runs for hours like an desktop during workday or even for weeks or years like my homeserver. As a consequence the state didnt change, the riemann integral doesnt calculate the energy used so it doesnt appear in the energy panel (like my homeserver as one of my biggest energy usages).

So my idea (if possible): Add fluctuation into the fixed mode. Every e.b. 10 minutes (or another poll time) change the value of the sensor like +-0.01, so the state changed event is triggered. If you fluctuate this with switching signings, this fluctuation will negate itself out so in mean it didn't affect the real energy usage. This would help to better suit the needs if it is used for the energy integration with fixed mode for devices that doesn't change it state that often.

Don't know if this is possible in code, but if possible this would be great

[multiply_factor] is an invalid option for [sensor.powercalc]

Not sure what I am doing wrong. I am on version 0.4.1 in HACS but if I add the multiply_factor option I get errors.

Invalid config for [sensor.powercalc]: [multiply_factor] is an invalid option for [sensor.powercalc]. Check: sensor.powercalc->multiply_factor. (See ?, line ?).
Invalid config for [sensor.powercalc]: [multiply_factor] is an invalid option for [sensor.powercalc]. Check: sensor.powercalc->multiply_factor. (See ?, line ?).

I have reinstalled the component and rebooted... YAML is:

# Dining Room
  - platform: powercalc
    entity_id: light.dining_room  
    manufacturer: Hue
    model: LWB006
    multiply_factor: 2

Is it me or...?

Total consumption

I have more than 100 hue lights in my house. I would love to have a total conspumption sensor instead of creating > 100 sensors. Can I achieve that without doing any hacks in HA? Thanks.

device_tracker support

is it possible to add the device_tracker support? I can see this as fixed type - just like binary_sensor.

I've got quite a few devices that I track with network presence, and they all have corresponding device_tracker sensors [home = device is on, not_home = device is off]. right now I started to add template binary_sensors to be able to add them to powercalc integration, but it would be great to avoid that sensor duplication.

New configuration option needed for specific but popular setups eg. LED strips

I think about mulitiplier/factor which can be used with drivers - for driver used with LED strips or even integrated low-voltage lamps (but for standard bulbs or lamps it just should always be 1, so it should have default value 1 only with option to modify when desired).
This multiplier should be used only with power data from LUT file (and not for standby_power).

Hardware examples
integrated lamps (could be used one or more pieces with one driver):
https://www.ikea.com/gb/en/p/urshult-led-cabinet-lighting-nickel-plated-30260402/
https://www.ikea.com/gb/en/p/lindshult-led-cabinet-lighting-nickel-plated-10260436/
drivers:
https://www.ikea.com/gb/en/p/tradfri-driver-for-wireless-control-grey-50356187/
https://www.ikea.com/gb/en/p/tradfri-driver-for-wireless-control-grey-60342656/

also LED stips in standard starter-kits have driver and predefined length of strip (eg. 5m), but available extension sets contain only smaller quantity and in case of strip it is possible to cut strip to desired size.

It is a kind of compromise (driver power usage counted properly only in case of standby), but I think, that LUT file should contain data for 1m of strip or for 1 piece of integrated lamp (measured or calculated from measure more than one piece connected together to driver or measured strip of any length; best measurements would be in standard setup - so I mean LED strip of leghth just like out of the box or typical count integrated lamps used with given model of driver).

It is of course possible to measure only driver working idle as separate file but it really make no sense because power losses in driver are different without load then in real work.

Some variation of that factor could be used also for groups of identical bulbs controlled always together (as group), but in such case standby power should be also multiplied.

Error changing energy_sensor_naming

Trying to configure energy sensor naming like this is not allowed:

powercalc:
  scan_interval: 00:01:00
  energy_sensor_naming: "Verbruik {}"

gives:

Invalid config for [powercalc]: does not match regular expression for dictionary value @ data['powercalc']['energy_sensor_naming']. Got 'Verbruik {}'. (See ?, line ?).

I want to get "Verbruik FRITZ!Box"

This works though:

powercalc:
  scan_interval: 00:01:00
  energy_sensor_naming: "{} verbruik"

Is this because it changes the sensor name, and it can only add something to it instead of insert in front?
Can't we just change sensor friendly name?

Not a big issue though... but it can save some config/code.

Possible to support climate entities?

Hi,

I was wondering if it was possible to support climate entites? I don't think all type of climate entites are having constant power usage (for example an air conditioner could vary a lot on power consumption based on if it is cooling and blowing air or just blowing air) so your integration is probably not feasible for all type of climate devices.

But for quite a few of my climate entites (ovens and floor heating) the power consumption is constant since they are using "full power" if turned on and nothing if turned off and I know what they use given that their power rating is known.

I understand that I can use template sensors for this but if I can avoid one "level" and just use climate entity directly that would be awesome!

Stop tracking power if state is `unavailable`

Hey!

Would it make sense to filter on the state of the device when tracking power?
If I have a bulb that has state on and then the broker goes down or my zigbee backend crashes. In this case, the bulb will have state unavailable in HA, but the related power (and energy) sensors will keep counting energy usage as if the bulb was still turned on.

Schedule of planned bulb/light measurements

Future plans should be posted here (it would be best to create a single discussion for each planned model):
https://github.com/bramstroker/homeassistant-powercalc/discussions/categories/planned-measurements

This is an information just to not duplicate measurement, when it will be not necessary.
@bramstroker @wormiedk @smonesi @CM000n @OzGav @franzbischoff and all future contributors:
Please add information about your measurements in preparation.

Here is my plan:

  • Signify LCT001 E27 (RGB+TW 1st gen) borrowed from a friend,
    now measuring in parallel to @wormiedk (to compare results)
    (HS mode should be ready 30/31 august 2021)

  • Ikea LED1624G9 E14 RGBW globe A60 borrowed from different friend,
    when LCT001 will be ready

  • Ikea LED1836G9 "TRADFRI bulb E27 WW 806lm" (tradfri E27 dimmable last gen)
    september 2021 when LED1624G9 will be ready (planned measurements using Shelly and HS110)

  • Ikea LED1624G9 "TRADFRI bulb E27 CWS opal 600lm" (RGB+TW 1st gen)
    september 2021

  • Signify light strip set (I don't know model now)
    when I can borrow it

  • Jiawen/Feibit "FB56-ZCW08KU1.1"
    only in situation, when all family leaves home for a long time (maybe Christmas/New Year 2022?)

  • Ikea LED1923R5 "TRADFRI bulb GU10 CWS 345lm" (RGB+TW last gen)
    as soon as possible (this is GU10 made of glass and I broke the glass…) edit: temporary ABANDONED due too many zero readings, and this bulb qualify to be in electro-waste bin (just broken glass, not a problem with bulb quality, but it is really dark - only 345lm). It depends on script possibilities to measure group of bulbs (as Shelly isn't capable to measure power <0.5W), when it will be ready I can buy more of them - just for measure - Ikea allows return of tested stuff (with or without small fee)
    https://www.ikea.com/gb/en/customer-service/returns-claims/return-policy/
    (of course I can't returm broken bulb, so be careful :D)

Hue bulbs

Hey does this work with hue light bulbs if so how can i install it i tried to but it wont show up on the home page

How to make LUT file without Hue bridge

Hi!

I control my lights directly using zigbee. I want to make a LUT file for some lights I have but the tool looks to me like it would only work with a hue bridge.

Is there some way to make it work using conbee too?

Thanks :)

Beginner Issue ?

Having added the integration and the small amount of YAML for LUT mode - with a subset of 5 lights....I simply can't find any sensors anywhere that appear to have anything to do with 'powercalc'.

What are they actually called once created please?

I've since dropped to just a single light (from the supported list) - and still nothing.

Thanks for any pointers!

No lookup file found for mode 'hs'

Hi Bram,

I'm using your great integration, but it only seems to work on two of my bulbs.
I've put 4 of them in my config right now, but on 2 bulbs I'm getting the following error:

Skipping sensor setup light.tv_meubel_links: ('No lookup file found for mode', 'hs') Skipping sensor setup light.tv_meubel_rechts: ('No lookup file found for mode', 'hs')

I've configured them in lut mode with manufacturer and model. I'm using the default Hue integration from HA, but without mode, manufacturer and model they all don't work.

So it seems I've got the some issue as mentions in issue:
#15

I don't understand the error for mode 'hs', because that mode isn't even mentioned in your documentation.

The model is LCT0015.

Can you help me out?

Energy sensor not created with a different name specified

Note sure if this is related to #108
I am currently using 0.5.3 and this is the situation.
I have a device tracker that I want to use. I am using another tracker without issue but this one had a problem from the start:

  - platform: powercalc
    entity_id: device_tracker.00_25_22_19_d1_54
    name: nas_power    
    fixed:
      power: 63

The initial probelm I think was a core HA problem because the power and energy sensor were created but I was getting a template error when I tried to use it in the following:

      - name: "All device power"
        unit_of_measurement: W
        icon: mdi:transmission-tower
        state: >
          {{ states.sensor.aircon_power_usage.state | float
          + states.sensor.tasmota_energy_power.state | float               
          + states.sensor.tank_pumo_current_consumption.state | float
          + states.sensor.mainpclan_power.state | float
          + states.sensor.gpo2_power.state | float                     
          + states.sensor.00_25_22_19_d1_54_power.state | float
          }}

So I added that name nas_power and the template is happy now but I noticed that the energy sensor is still sensor.00_25_22_19_d1_54_energy. I say still but I can't be sure it was created in the first place but have no reason to suspect it wasn't. In any case should the energy sensor be named like that or should it be using the new name. Also while I am talking about it I also found the name: option didn't work as I expected. I thought it would take my name and suffix with _power and _energy but obviously I discovered I had to call it nas_power.
Thoughts?

Edit: Actually @bramski80 maybe your explanation here is what happened: https://community.home-assistant.io/t/powercalc-virtual-power-sensors/318515/108?u=ozgav

Allow use of input_select and/or other helper entities for fixed mode

I have quite a few devices that I'd like to use with the fixed mode that aren't smart in any way, nor have an easy way to integrate their state into home assistant. I'd like to be able to use input_select so that I can use the fixed states_power method of calculating their energy consumption. A work around is to use a template sensor with my input_select, but having to do two sensors for each device is a little tedious. I think helper type entity support could go a long way.

Problem with ikea GU10 light

I've added Hue lights without problem. But when I try to add my Ikea GU10 I've got an error in logs.
According to your compatibility list the standard 400lm light is LED1650R5.

Sensors.yaml:

  entity_id: light.ikea_gu_10
  manufacturer: ikea
  model: LED1650R5

Error log:

Skipping sensor setup light.ikea_gu_13: ('No lookup file found for mode', 'color_temp')
Skipping sensor setup light.ikea_gu_8: ('No lookup file found for mode', 'color_temp')
Skipping sensor setup light.ikea_gu_9: ('No lookup file found for mode', 'color_temp')
Skipping sensor setup light.ikea_gu_10: ('No lookup file found for mode', 'color_temp'

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.