mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Add food dispensed today and next feeding sensors to litterrobot (#152016)
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
This commit is contained in:
@@ -104,6 +104,7 @@ async def test_litter_robot_sensor(
|
||||
assert sensor.attributes["state_class"] == SensorStateClass.TOTAL_INCREASING
|
||||
|
||||
|
||||
@pytest.mark.freeze_time("2022-09-08 19:00:00+00:00")
|
||||
async def test_feeder_robot_sensor(
|
||||
hass: HomeAssistant, mock_account_with_feederrobot: MagicMock
|
||||
) -> None:
|
||||
@@ -117,6 +118,16 @@ async def test_feeder_robot_sensor(
|
||||
assert sensor.state == "2022-09-08T18:00:00+00:00"
|
||||
assert sensor.attributes["device_class"] == SensorDeviceClass.TIMESTAMP
|
||||
|
||||
sensor = hass.states.get("sensor.test_next_feeding")
|
||||
assert sensor.state == "2022-09-09T12:30:00+00:00"
|
||||
assert sensor.attributes["device_class"] == SensorDeviceClass.TIMESTAMP
|
||||
|
||||
sensor = hass.states.get("sensor.test_food_dispensed_today")
|
||||
assert sensor.state == "0.375"
|
||||
assert sensor.attributes["last_reset"] == "2022-09-08T00:00:00-07:00"
|
||||
assert sensor.attributes["state_class"] == SensorStateClass.TOTAL
|
||||
assert sensor.attributes["unit_of_measurement"] == "cups"
|
||||
|
||||
|
||||
async def test_pet_weight_sensor(
|
||||
hass: HomeAssistant, mock_account_with_pet: MagicMock
|
||||
|
||||
Reference in New Issue
Block a user