Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor attributes missing #21

Open
felixrohrbach opened this issue Apr 26, 2022 · 10 comments
Open

Sensor attributes missing #21

felixrohrbach opened this issue Apr 26, 2022 · 10 comments

Comments

@felixrohrbach
Copy link

Using HA Core 2022.4.6
Using Plugin Version 0.3.5

Sensor seems to update (in developer tools last changed/last updated changes), but sensor no longer carries the additional attributes like Destination, Arrival time, ...

@anand-p-r
Copy link
Owner

@felixrohrbach Have been very busy off late. Sorry! Will get to this issue soon. Hang in there!

@sla004
Copy link

sla004 commented Jul 5, 2022

I'm also waiting this...

@MikkoIlari
Copy link

Is this still working? I cannot get values for cards or values are all the time same. That differs what card I am trying to use.

@MikkoIlari
Copy link

This was solution for my problem. Thanks to jroine.

Hi,

it appears that this module is currently broken because device_state_attributes has been replaced by extra_state_attributes.

Workaround: replace line 105 of sensor.py from
def device_state_attributes(self):
to
def extra_state_attributes(self):

@felixrohrbach
Copy link
Author

@MikkoIlari : for me this problem still exists. I tried to make the change you mentioned, but now the integration does not create the sensors. Maybe to retrace what I did:

  • removed the integration for my stop
  • downloaded latest files from github
  • made changes to the file
  • copied all into the custom_components folder like I had before
  • restarted homeassistant
  • added integration by entering my stop code
  • integration is added, but no device/entity is set up for it

Did you make any further changes to the files besides the one that you mentioned?

@MikkoIlari
Copy link

@MikkoIlari : for me this problem still exists. I tried to make the change you mentioned, but now the integration does not create the sensors. Maybe to retrace what I did:

  • removed the integration for my stop
  • downloaded latest files from github
  • made changes to the file
  • copied all into the custom_components folder like I had before
  • restarted homeassistant
  • added integration by entering my stop code
  • integration is added, but no device/entity is set up for it

Did you make any further changes to the files besides the one that you mentioned?

Hi,

I only change that def device_state_attributes(self): to def extra_state_attributes(self): and it started to work.

@kavaleff
Copy link

Same problem here, won't work even with the suggested change on code. Deleted integration and reinstalled, no change. Can only see Route number in the entity, no other attributes.

Any help from author is highly appreciated.

@MikkoIlari
Copy link

Hi,

I have this version:

Home Assistant Core
Installed version
2022.10.4

I have used examples from here: https://github.com/anand-p-r/hslhrt-hass-custom/blob/main/README.md

I do not have any tips, but I can check my configuration if you have any questions.

Screenshot 2022-10-24 at 16 11 10

@viljate
Copy link

viljate commented Oct 28, 2022

For me suggested fix got this working again. Thanks!

@Leissson
Copy link

Leissson commented Sep 6, 2023

This was solution for my problem. Thanks to jroine.

Hi,

it appears that this module is currently broken because device_state_attributes has been replaced by extra_state_attributes.

Workaround: replace line 105 of sensor.py from def device_state_attributes(self): to def extra_state_attributes(self):

This worked for me, thx @MikkoIlari !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants