broadlink-listener
1.2.0

documentation:

  • Broadlink Listener
  • Installation
  • Usage
  • API
    • broadlink_listener
      • broadlink_listener.cli_tools
        • broadlink_listener.cli_tools.broadlink_manager
        • broadlink_listener.cli_tools.cli
        • broadlink_listener.cli_tools.smartir_manager
        • broadlink_listener.cli_tools.utils
  • Contributing
  • Credits
  • Changelog
broadlink-listener
  • »
  • API »
  • broadlink_listener »
  • broadlink_listener.cli_tools »
  • broadlink_listener.cli_tools.smartir_manager »
  • broadlink_listener.cli_tools.smartir_manager.SmartIrManager
  • View page source

broadlink_listener.cli_tools.smartir_manager.SmartIrManager

class broadlink_listener.cli_tools.smartir_manager.SmartIrManager(file_name: pathlib.Path, broadlink_mng: broadlink_listener.cli_tools.broadlink_manager.BroadlinkManager, no_temp_on_mode: tuple = (), no_swing_on_mode: tuple = ())[source]

Bases: object

Manager class for SmartIR json.

__init__(file_name: pathlib.Path, broadlink_mng: broadlink_listener.cli_tools.broadlink_manager.BroadlinkManager, no_temp_on_mode: tuple = (), no_swing_on_mode: tuple = ())[source]

Smart IR Manager.

Parameters
  • file_name – SmartIR json file that contains basic structure of codes to be recorded.

  • broadlink_mng – Broadlink Manager object used to listen IR codes

  • no_temp_on_mode – option, that can be set multiple times, related to operating mode that have no temperature selection

  • no_swing_on_mode – option, that can be set multiple times, related to operating mode that have no swing selection

Raises

UsageError – raised if controller is not Broadlink or no IR signal is learnt during the process

Methods

__init__(file_name, broadlink_mng[, ...])

Smart IR Manager.

learn_all()

Learn all the commands depending on calculated combination.

learn_off()

Learn OFF command that's outside the combination.

save_dict()

Save modified dict to output json file.

Attributes

fan_mode

Fan Mode key saved to json.

operation_mode

Operation Mode key saved to json.

partial_inc

Partial increment value.

smartir_dict

Output dictionary, for test purpose.

swing_mode

Swing Mode key saved to json.

temperature

Temperature key saved to json.

property fan_mode: str

Fan Mode key saved to json.

Returns

fan mode string to be saved

Return type

str

learn_all()[source]

Learn all the commands depending on calculated combination.

Raises

UsageError – if no IR signal is learnt within timeout

learn_off()[source]

Learn OFF command that’s outside the combination.

Raises

UsageError – if no IR signal is learnt within timeout

property operation_mode: str

Operation Mode key saved to json.

Returns

operation mode string to be saved

Return type

str

property partial_inc: int

Partial increment value.

Returns

last index of saved partial json files

Return type

int

save_dict()[source]

Save modified dict to output json file.

property smartir_dict: dict

Output dictionary, for test purpose.

Returns

smartir compatible dictionary with learnt codes.

Return type

dict

property swing_mode: str

Swing Mode key saved to json.

Returns

swing mode string to be saved

Return type

str

property temperature: str

Temperature key saved to json.

Returns

temperature string to be saved

Return type

str

Previous Next

© Copyright 2022-12-03, Gabriele Pongelli.

Built with Sphinx using a theme provided by Read the Docs.