Chromecast off, but HASS still thinks it's on

I’d like to automate turning off lights except when Chromecast is playing something.
Problem is, even when I turn off the Chromecast completely (it’s powered by the tv and I turn that off), HASS still thinks it’s playing, so the lights stay on.

Is this a bug? How can I fix it?

Seems like even though your TV is powered off the USB port still has 5V on it. Try unplugging it from the TV and see if it goes away in HASS.

1 Like

I have noticed this same behavior and, at least in my case, the usb port on the tv is unpowered when the tv is off.

I tested this but unfortunately HASS still thinks Chromecast is on.

I’d say, when HASS notices this:

16-10-01 16:00:15 pychromecast.socket_client: Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/hass/deps/pychromecast/socket_client.py", line 233, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
OSError: [Errno 113] No route to host

It should put the state of the Chromecast in HASS on OFF.

Just want to say this is still an issue. Even in the latest version 0.30.1.

A fix would be much appreciated.

1 Like

A fix would be much appreciated.

I have seen the same behavior. When HASS loses connection to the Chromecast, it just stays in whatever state it was previously. Would be nice if it switched it’s state to Off when it lost connection.

Same here - I turn my TVs off which then kills the Chromecast, Home Assistant thinks the Chromecast is still online/playing and doesn’t time-out or update the status until I restart Home Assistant.

+1. In addition to not updating the status, if my Chromecast isn’t powered on at the time that HASS is restarted it will never show up in the UI.

That’s true as well. The Chromecast needs to be on while restarting HASS.

Anyone fixed this?
I still have this issue in 0.37.1.

I have this problem too. I’ve tried disabling auto discovery and manually specifying the Cast’s IP address.

I’m still experiencing this issue as well. Anyone found a solution?

Add this to load cast component.

Press pause or stop on your tv remote before turning off tv assuming you have it.

That is at least one way for now.