Comments (15)
Yes I think support for that can be added
from homeassistant-powercalc.
I did have a look but cannot reproduce this.
Did test this with a Denon Heos speaker and set the speaker to playing or paused, but it is displaying the power which I specified.
This is my config:
- platform: powercalc
entity_id: media_player.terras
fixed:
power: 34.5
In both cases the power sensor value is 34.5 both for playing and paused. Which is correct imo.
I have added some extra debug logging so I could monitor all the state changes from the mediaplayer.
2021-06-28 20:53:26 DEBUG (MainThread) [custom_components.powercalc.sensor] State changed to "paused" for entity "media_player.terras". Power:34.5
2021-06-28 20:57:52 DEBUG (MainThread) [custom_components.powercalc.sensor] State changed to "playing" for entity "media_player.terras". Power:34.5
I have no clue why this is not working for your case.
This debug logging has been added to the master branch. Could you try with the master version and enable debug logging (see the readme)?
Hope we have some more information why it not works for you.
from homeassistant-powercalc.
from homeassistant-powercalc.
You have the same behaviour as me, and that's actually expected.
There is no difference in power consumption between playing/paused states. In both cases the device is actually on and the component will show the defined power. When the sonos is paused it will still draw power, I assume quite similar to when it is actively playing a song. Right now it's not possible yet to specify power per state.
But maybe I can add something like this.
sensor
- platform: powercalc
entity_id: media_player.bureau
fixed:
states_power:
playing: 8.8
paused: 2.3
from homeassistant-powercalc.
from homeassistant-powercalc.
from homeassistant-powercalc.
Resolved by #44
from homeassistant-powercalc.
from homeassistant-powercalc.
I have just released version 0.2.3, that includes the new feature. Let me know if this works for you.
from homeassistant-powercalc.
from homeassistant-powercalc.
Yes, I'm sorry I found the problem.
Could you update to 0.2.4?
from homeassistant-powercalc.
This has to do with python versions. I am running a more recent version of python on my development instance than home assistant OS. That's why I don't see this error on my development instance. Will see if I can downgrade my python version or add some tests / checks in CI to prevent this error in the future.
from homeassistant-powercalc.
from homeassistant-powercalc.
Top ;-)
The right example is in the Readme, but you figured it out already
from homeassistant-powercalc.
Ah, I see the readme is incorrect. Will update
from homeassistant-powercalc.
Related Issues (20)
- Philips Hue Bloom LC001 HOT 6
- JSONDecodeError and not a valid ColorMode Error during startup since v1.12.12 HOT 15
- Error while dispatching HOT 9
- ability to enter power-on consumption for 'Sonof ZBmini01' via the configure GUI HOT 3
- Why is powercalc trying to reach the internet after installation and setup? HOT 11
- Thanks for the contribution, makes sense to add the alias as you also verified the power draw is similar. HOT 2
- cant delete entries on the integration HOT 9
- Energy sensor have mixed kWh or Wh as unit HOT 10
- light_setting.hue = int(hs[0] / 360 * 65535) ~~^^^ TypeError: 'NoneType' object is not subscriptable HOT 4
- Innr outdoor lights
- Adopt powercalc to change in device info HOT 1
- Add IKEA LED2104R3 GU10 bulb
- Support for multiple-outlet smart outlets and smart strips HOT 20
- Energy sum to retrieve untracked energy HOT 5
- Option flow cleanup HOT 1
- More than 130 powercalc light entities per room. Why? HOT 11
- Adding my autodectected TP-Link HS300 results in exception HOT 4
- A sensor grouping power sensors went crazy HOT 7
- Allow edit of disabled PowerCalc entry HOT 3
- Problem with group-type entities HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-powercalc.