Log error when using zwave_js 'refresh_value' on ping button/node status sensor (#66847)

* Raise when using 'zwave_js.refresh_value' on ping button

* Revert test change

* block till done

* Switch from raising an exception to logging an error for both the ping button and node status sensor

* missed commit
This commit is contained in:
Raman Gupta 2022-02-22 06:03:01 -05:00 committed by GitHub
parent 909de62bd4
commit a12d6aa6ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 2 deletions

View file

@ -488,7 +488,10 @@ class ZWaveNodeStatusSensor(SensorEntity):
async def async_poll_value(self, _: bool) -> None:
"""Poll a value."""
# pylint: disable=no-self-use
raise ValueError("There is no value to poll for this entity")
LOGGER.error(
"There is no value to refresh for this entity so the zwave_js.refresh_value "
"service won't work for it"
)
@callback
def _status_changed(self, _: dict) -> None: