diff --git a/homeassistant/components/shodan/sensor.py b/homeassistant/components/shodan/sensor.py index 6fc73f40096..bdef681fdd2 100644 --- a/homeassistant/components/shodan/sensor.py +++ b/homeassistant/components/shodan/sensor.py @@ -67,7 +67,7 @@ class ShodanSensor(SensorEntity): def update(self) -> None: """Get the latest data and updates the states.""" data = self.data.update() - self._attr_native_value = data.details["total"] + self._attr_native_value = data["total"] class ShodanData: