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

TypeError: Cannot read properties of undefined #9

Closed
simphide opened this issue Nov 26, 2023 · 5 comments
Closed

TypeError: Cannot read properties of undefined #9

simphide opened this issue Nov 26, 2023 · 5 comments

Comments

@simphide
Copy link

Since two days I am getting the following error:
image

Downgrading didn't help.

Do you have a idea what the problem could be?

@xZetsubou
Copy link
Owner

xZetsubou commented Nov 26, 2023

Can you post your card yaml code. probably because one of ETA, Remaining or Elapsed is incorrect

@xZetsubou
Copy link
Owner

xZetsubou commented Nov 26, 2023

Mind to enable beta on HACS and try 2.1.8, you need to select 2.1.8 manually as HACS won't auto select it

Enable beta

Go HACS -> Local Tuya -> On top right corner click on the ⋮ and redownload select latest beta -> restart HA.
You need to select the latest beta version manually it HACS doesn't auto select it

image

@simphide
Copy link
Author

For some reasons the beta version isn't shown at all:
image

I have reinstalled the card multiple times (via HACS) and tried to open the page with different browsers.

@xZetsubou
Copy link
Owner

xZetsubou commented Nov 27, 2023

Sorry, try again beta version should shows on HACS. I really recommend you to not rely on base_entity anymore as this card uses static snesors names and may be outdated and also this error probably because card couldn't found ETA or Remaining sensors.
instead override the sensors manually if it didn't works.

card yaml

type: custom:threedy-card
always_show: true
base_entity: ''
printer_type: I3
name: Ender 3 Pro
camera_entity: camera.ender_3_pro_camera
power_entity: switch.ender3pro_plug
light_entity: light.ender3_printer
use_mqtt: true
monitored:
  - Status
  - ETA
  - Elapsed
  - Remaining
  - Hotend
  - Bed
round_temperature: true
round_time: true
camera_rotate: true
sensors:
  Progress:
    entity: sensor.octoprint_job_percentage
  Elapsed:
    entity: sensor.octoprint_start_time
  Remaining:
    entity: sensor.octoprint_estimated_finish_time
  ETA:
    entity: sensor.octoprint_estimated_finish_time
  Status:
    entity: sensor.octoprint_current_state
  Hotend:
    entity: sensor.octoprint_target_tool0_temp
  Bed:
    entity: sensor.octoprint_target_bed_temp

I updated sensors names by if ETA or Remaining or Elpased failed in the future override them like the card config above :)

@simphide
Copy link
Author

Thanks for the hint! It is working now as expected!

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

2 participants