(self, entity_id)
return latest_alarm_states_by_alarm.values()
Computes the latest alarm states for the specified entity.

        Newer alarm states are assumed to be always appended to the list of
        alarm states.
Computes the latest alarm states for the specified entity.
Computes the latest alarm states for the specified entity .
def latest_alarm_states_for_entity(self, entity_id):
        """
        Computes the latest alarm states for the specified entity.

        Newer alarm states are assumed to be always appended to the list of
        alarm states.
        """
        alarm_states_for_entity = [state for state in self.alarm_states
                                   if state.entity_id == entity_id]
        latest_alarm_states_by_alarm = {}
        for state in alarm_states_for_entity:
            latest_alarm_states_by_alarm[state.alarm_id] = state
        return latest_alarm_states_by_alarm.values()
def latest_alarm_states_for_entity ( self , entity_id ) : alarm_states_for_entity = [ state for state in self . alarm_states if state . entity_id == entity_id ] latest_alarm_states_by_alarm = { } for state in alarm_states_for_entity : latest_alarm_states_by_alarm [ state . alarm_id ] = state return latest_alarm_states_by_alarm . values ( )