Comments (11)
Thanks for reporting.
Could you try commenting lines (147, 148, 151 and 152) in sensor.py please in you installation and see if this helps?
from homeassistant-powercalc.
Thanks for reporting.
Could you try commenting lines (147, 148, 151 and 152) in sensor.py please in you installation and see if this helps?
tried that few minutes ago - no sensor created at all :( [strange?]
from homeassistant-powercalc.
Ah ok that sucks. Will have to do some further testing / debugging to reproduce this issue and solve it.
Will be able to in a few days.
from homeassistant-powercalc.
no problem, I can test it further then if you'll want - just need information what to do :)
from homeassistant-powercalc.
ok, so first of all: I have no idea what I'm doing (being more like a copy-n-paste-programmer that barely understands python), and I don't know if it makes any sense, but I was staring at your code & comparing some powercalc created entities with those in my Home Assistant.
there are lines in sensor.py that call entity_entry.entity_id
(like L298) - I guess that it's printing the "original" HomeAssistant sensor/light/etc. entity_id in the log for debugging purposes. and looking at lines 147-152 that you've mentioned, there's no sign of entity_entry.entity_id
, just unique_id = entity_entry.unique_id
(I understand that entity_entry is an object that stores all data about given entity).
I might be totally wrong, and yet don't want to blow up my working installation by messing up the code ;) but shouldn't that be something like unique_id = entity_entry.entity_id.replace("", source_entity_domain)
? I'm sure my "code" is wrong but you know what I mean :) (also: if this unique_id
is exactly that you can forget about my comment here ;))
from homeassistant-powercalc.
additional reports below
KODI instance on RaspberryPi3
- entity_id: media_player.1_living_kodi
- powercalc entities: sensor.none_energy, sensor.none_power
- I've checked in the integration dashboard - KODI model is listed as "unknown"
my Samsung TV:
- entity_id: media_player.1_living_tv
- power calc entities: sensor.ue50f6400_energy, sensor.ue50f6400_power
- I've checked in the integration dashboard - TV model is listed as "UE50F6400"
so it clearly takes the model name and builds entities based on this
from homeassistant-powercalc.
Yes currently it takes name of the original entity to construct the power and energy sensor name. And from this name the entity_id is generated.
I did some changes in #116 to use entity_id as a base, but this is a major change and complex (I am not sure this has no side effects for other users), because when the entity_id changes they could loose historic data.
Will first do some extensive testing myself.
from homeassistant-powercalc.
I did some changes in #116 to use entity_id as a base, but this is a major change and complex (I am not sure this has no side effects for other users), because when the entity_id changes they could loose historic data.
understood, but I guess that entity_id is nothing you'll change too often [probably only few times at the start of the config] yet it is something that people are using to identify entities so IMHO it is more logical to use this than the original entity or even model name, which are somewhere deep inside dashboard.
Will first do some extensive testing myself.
sure, if I can help somehow with testing - feel free to ask! :)
from homeassistant-powercalc.
Just did a lot of cleanups and refactoring and issued first beta. v0.5.0-beta.1.
Are you able to test with this version and let me know your findings?
from homeassistant-powercalc.
Just did a lot of cleanups and refactoring and issued first beta. v0.5.0-beta.1.
Are you able to test with this version and let me know your findings?
removed all powercalc sensors, installed v0.5.0-beta.1, re-added all entities and... so far, so good! looks like all powercalc entity_ids are created from corresponding homeassistant's entity_ids. above mentioned issues with computer, tv and kodi - are gone! 👍 other things seems to work like earlier 👍
from homeassistant-powercalc.
Feature is released
from homeassistant-powercalc.
Related Issues (20)
- 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
- Error occurred loading flow for integration powercalc: cannot import name 'ConfigEntryBaseFlow' HOT 3
- Ssl error on setup HOT 2
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.