-
Notifications
You must be signed in to change notification settings - Fork 47
Some entities have been removed in Home Assistant 2021.11 #43
Comments
Had to remove the following monitors from my card to have it working again
|
Hi, got the same issue, creating two template sensors temporarily patches the issue - name: OctoPrint Time Elapsed
unit_of_measurement: 's'
availability: >
{{ not is_state('sensor.octoprint_start_time', 'unavailable') }}
state: >
{% set start = as_timestamp(states('sensor.octoprint_start_time')) %}
{% if is_number(start) %}
{{ (as_timestamp(now()) - start) | int }}
{% else %}
unknown
{% endif %}
attributes:
start_time: "states('sensor.octoprint_start_time')"
- name: OctoPrint Time Remaining
unit_of_measurement: 's'
availability: >
{{ not is_state('sensor.octoprint_estimated_finish_time', 'unavailable') }}
state: >
{% set finish = as_timestamp(states('sensor.octoprint_estimated_finish_time')) %}
{% if is_number(finish) %}
{{ (finish - as_timestamp(now())) | int }}
{% else %}
unknown
{% endif %}
attributes:
start_time: "states('sensor.octoprint_estimated_finish_time')" For some reason I have an issue formatting this code in here :'( EDIT: Thanks @0rax, with your example, I've been able to format mine correctly :) |
Thanks @SupremeSports, worked like a charm. Here is a formatted version of the sensors: template:
- sensor:
- name: "OctoPrint Time Elapsed"
unit_of_measurement: 's'
availability: >
{{ not is_state('sensor.octoprint_start_time', 'unavailable') }}
state: >
{% set start = as_timestamp(states('sensor.octoprint_start_time')) %}
{% if is_number(start) %}
{{ (as_timestamp(now()) - start) | int }}
{% else %}
unknown
{% endif %}
attributes:
start_time: "states('sensor.octoprint_start_time')"
- name: "OctoPrint Time Remaining"
unit_of_measurement: 's'
availability: >
{{ not is_state('sensor.octoprint_estimated_finish_time', 'unavailable') }}
state: >
{% set finish = as_timestamp(states('sensor.octoprint_estimated_finish_time')) %}
{% if is_number(finish) %}
{{ (finish - as_timestamp(now())) | int }}
{% else %}
unknown
{% endif %}
attributes:
start_time: "states('sensor.octoprint_estimated_finish_time')" |
Similar issues. Although these entities are present in the Octoprint integration (via UI) they must be different to what this card looks for. If any of these are added it kills the whole lovelace page. Can use a template like listed in other posts, but this is a bit of a messy work around |
I created this workaround as a, hopefully, temporary measure 👍 |
Unfortunately, it appears that development on this project has stalled. |
Shouldn't the second attribute (for "OctoPrint Time Remaining" be something like "estimated_finish_time" rather than "start_time"? |
Unfortunately for me, this solution doesn't work in my use case. What I want to do is send a notification on end-of-print, but with the condition that the elapsed time for the finished print was more than 15 minutes. Previously, elapsed time was available after the print had finished, but now it appears to be "unavailable". Is there a way I can access the elapsed time similarly to percentage complete and other values? |
Hi trying to make this workaround but I find some issues. I defined the sensor above like @0rax reported but don't understand how to recall it on the threedy card (if I have too?). |
I thought all the "sensors" were generated by Home Assistant and the integration. Threedy only displays the sensors that are available. |
Template code is given in previous comments... #43 (comment) |
Yes I copied the one formatted from @0rax but right now the threedy card with ETA, Elapsed and Remaining reports errors (these entities are not defined): template:
I defined them into sensor but how can I re-call it inside the threedy card? |
Hey guys, |
When you create those sensors in template, they will be created as Nothing else is needed as the card is looking for those 2 sensors with correct names |
Maybe somebody can fix this in the integration ? :-) |
Hi... just wanna leave this update for everybody in case it will need. I finally got the sensors and everything is working well again. template:
Reboot Home assistant and you should find two sensors called: |
Thanks guys. This works just fine. |
Fix for dangreco#43
I've created a fork of this repo and fixed some issues like the state undefined stuff, check it out here: https://github.com/e11en/ha-threedy-card |
threedy/src/Components/Stats/utils.tsx
Lines 56 to 84 in de1be7a
See breaking changes in the PR home-assistant/core#58040
The text was updated successfully, but these errors were encountered: