Disable mopeka accelerometer sensors by default (#87420)
* Disable mopeka accelerometer sensors by default These generate a significant amount of noise and are only useful when placing the sensor. Disable them by default. This not a breaking change because existing preferences are preserved. * adjust testspull/87427/head
parent
19e27f4f52
commit
3be6d4dcfb
|
@ -76,10 +76,12 @@ SENSOR_DESCRIPTIONS = {
|
||||||
"accelerometer_x": SensorEntityDescription(
|
"accelerometer_x": SensorEntityDescription(
|
||||||
key="accelerometer_x",
|
key="accelerometer_x",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
"accelerometer_y": SensorEntityDescription(
|
"accelerometer_y": SensorEntityDescription(
|
||||||
key="accelerometer_y",
|
key="accelerometer_y",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ async def test_sensors_bad_signal(hass):
|
||||||
assert len(hass.states.async_all("sensor")) == 0
|
assert len(hass.states.async_all("sensor")) == 0
|
||||||
inject_bluetooth_service_info(hass, PRO_SERVICE_INFO)
|
inject_bluetooth_service_info(hass, PRO_SERVICE_INFO)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
assert len(hass.states.async_all("sensor")) == 6
|
assert len(hass.states.async_all("sensor")) == 4
|
||||||
|
|
||||||
temp_sensor = hass.states.get("sensor.pro_plus_eeff_temperature")
|
temp_sensor = hass.states.get("sensor.pro_plus_eeff_temperature")
|
||||||
temp_sensor_attrs = temp_sensor.attributes
|
temp_sensor_attrs = temp_sensor.attributes
|
||||||
|
@ -65,7 +65,7 @@ async def test_sensors_good_signal(hass):
|
||||||
assert len(hass.states.async_all("sensor")) == 0
|
assert len(hass.states.async_all("sensor")) == 0
|
||||||
inject_bluetooth_service_info(hass, PRO_GOOD_SIGNAL_SERVICE_INFO)
|
inject_bluetooth_service_info(hass, PRO_GOOD_SIGNAL_SERVICE_INFO)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
assert len(hass.states.async_all("sensor")) == 6
|
assert len(hass.states.async_all("sensor")) == 4
|
||||||
|
|
||||||
temp_sensor = hass.states.get("sensor.pro_plus_eeff_temperature")
|
temp_sensor = hass.states.get("sensor.pro_plus_eeff_temperature")
|
||||||
temp_sensor_attrs = temp_sensor.attributes
|
temp_sensor_attrs = temp_sensor.attributes
|
||||||
|
|
Loading…
Reference in New Issue