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

FR: Electricity connected binary sensor #40

Open
savikko opened this issue Aug 4, 2024 · 1 comment
Open

FR: Electricity connected binary sensor #40

savikko opened this issue Aug 4, 2024 · 1 comment

Comments

@savikko
Copy link

savikko commented Aug 4, 2024

It seems that there is not currently binary sensor to see if outside electricity/supply 230VAC is connected.

Although, it seems that OPERATING_STATUS changes from 5 to 7 when electricity is connected but it also seems that this status has other functionalities so this cannot be used as a binary sensor here.

So, this sensor would be only to get info that is there outside electricity connected.

Will update this issue to provide the source for this info (I have found this somewhere, but needs little bit searching).

@savikko
Copy link
Author

savikko commented Aug 5, 2024

Ah, operating status is actually binary, so quicky hack to get that data is to parse bits from that value like this:

binary_sensor:
  - platform: template
    name: "Supply Electricity"
    lambda: |-
      return ((int) id(operating_status).state & 0b00000010) != 0;

sensor:
  - platform: truma_inetbox
    name: "Operating status"
    id: operating_status
    type: OPERATING_STATUS

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

1 participant