
    8i              
          S r SSKJr  SSKJrJrJrJrJrJ	r	J
r
  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SS	KJr  S
SKJr  S
SKJrJr  \R8                  S\R:                  S\R<                  S\R>                  S\R@                  S0r!\!RE                  5        V Vs0 s H  u  pX_M	     snn r#\RH                  S\RJ                  S\RL                  S\RN                  S0r(\(RE                  5        V Vs0 s H  u  pX_M	     snn r)SSSSS.r*\*RE                  5        V Vs0 s H  u  pX_M	     snn r+\	RX                  \	RZ                  \	R\                  S.r/\/RE                  5        V Vs0 s H  u  pX_M	     snn r0S\S\S\SS4S  jr1 " S! S"\\5      r2 " S# S$\\5      r3 " S% S&\\5      r4 " S' S(\\5      r5gs  snn f s  snn f s  snn f s  snn f ))zSelect platform for dyson.    )Callable)DysonPureCoolLinkDysonPureHotCoolLinkDysonPurifierHumidifyCoolHumidifyOscillationModeTiltWaterHardnessDysonBigQuiet)AirQualityTarget)SelectEntity)ConfigEntry)	CONF_NAME)HomeAssistant)EntityCategory   )DysonEntity)DATA_DEVICESDOMAINOffGoodDefault	SensitivezVery Sensitiveu   45°u   90°BreezeCustomu   0°u   25°u   50°)r      2   ig  )SoftMediumHardhassconfig_entryasync_add_entitiesreturnNc                   #    U R                   [           [           UR                     nUR                   [           n/ n[        U[        5      (       d  [        U[        5      (       a  UR                  [        X45      5        [        U[        5      (       a%  UR                  [        X45      [        X45      /5        [        U[        5      (       a  UR                  [        X45      /5        U" U5        g7f)z(Set up Dyson sensor from a config entry.N)datar   r   entry_idr   
isinstancer   r   appendDysonAirQualitySelectr   extendDysonOscillationModeSelectDysonWaterHardnessSelectr
   DysonTiltSelect)r    r!   r"   devicenameentitiess         //config/custom_components/dyson_local/select.pyasync_setup_entryr2   G   s      YYv|,\-B-BCFY'DH&.//:!4 4 	-f;<&344*68(6	
 &-((-	

 x s   C4C6c                       \ rS rSrSr\R                  r\" \	R                  5       5      r\S\4S j5       rS\SS4S jr\S\4S j5       r\S	 5       rS
rg)r)   b   z(Air quality target for supported models.r#   c                 <    [         U R                  R                     $ z#Return the current selected option.)AIR_QUALITY_TARGET_ENUM_TO_STR_deviceair_quality_targetselfs    r1   current_option$DysonAirQualitySelect.current_optionh   s     .dll.M.MNN    optionNc                 H    U R                   R                  [        U   5        g"Configure the new selected option.N)r8   set_air_quality_targetAIR_QUALITY_TARGET_STR_TO_ENUMr;   r?   s     r1   select_option#DysonAirQualitySelect.select_optionm   s    ++,J6,RSr>   c                     g)Return the name of the select.zAir Quality r:   s    r1   sub_nameDysonAirQualitySelect.sub_nameq        r>   c                     g)Return the select's unique id.air_qualityrJ   r:   s    r1   sub_unique_id#DysonAirQualitySelect.sub_unique_idv   rM   r>   rJ   )__name__
__module____qualname____firstlineno____doc__r   CONFIG_attr_entity_categorylistrD   keys_attr_optionspropertystrr<   rF   rK   rQ   __static_attributes__rJ   r>   r1   r)   r)   b   s    2*117<<>?MO O OTC TD T #    r>   r)   c                       \ rS rSrSr\R                  rSr\	" \
R                  5       5      r\S\4S j5       rS\SS4S jr\S\4S	 j5       r\S
 5       rSrg)r+   |   z&Oscillation mode for supported models.zmdi:syncr#   c                 <    [         U R                  R                     $ r6   )OSCILLATION_MODE_ENUM_TO_STRr8   oscillation_moder:   s    r1   r<   )DysonOscillationModeSelect.current_option   s     ,DLL,I,IJJr>   r?   Nc                 H    U R                   R                  [        U   5        grA   )r8   enable_oscillationOSCILLATION_MODE_STR_TO_ENUMrE   s     r1   rF   (DysonOscillationModeSelect.select_option   s    ''(DV(LMr>   c                     g)rI   zOscillation ModerJ   r:   s    r1   rK   #DysonOscillationModeSelect.sub_name        "r>   c                     g)rO   rd   rJ   r:   s    r1   rQ   (DysonOscillationModeSelect.sub_unique_id   rl   r>   rJ   )rS   rT   rU   rV   rW   r   rX   rY   
_attr_iconrZ   rh   r[   r\   r]   r^   r<   rF   rK   rQ   r_   rJ   r>   r1   r+   r+   |   s    0*11J5::<=MK K KNC ND N "# " " " "r>   r+   c                       \ rS rSrSr\R                  rSr\	" \
R                  5       5      r\S\4S j5       rS\SS4S jr\S\4S	 j5       r\S
 5       rSrg)r-      zTilt for supported models.zmdi:acute-angler#   c                 <    [         U R                  R                     $ r6   )TILT_ENUM_TO_STRr8   tiltr:   s    r1   r<   DysonTiltSelect.current_option   s       1 122r>   r?   Nc                 H    U R                   R                  [        U   5        grA   )r8   set_tiltTILT_STR_TO_ENUMrE   s     r1   rF   DysonTiltSelect.select_option   s    .v67r>   c                     g)rI   r   rJ   r:   s    r1   rK   DysonTiltSelect.sub_name        r>   c                     g)rO   rt   rJ   r:   s    r1   rQ   DysonTiltSelect.sub_unique_id   r|   r>   rJ   )rS   rT   rU   rV   rW   r   rX   rY   ro   rZ   rx   r[   r\   r]   r^   r<   rF   rK   rQ   r_   rJ   r>   r1   r-   r-      s    $*11"J)..01M3 3 38C 8D 8 #    r>   r-   c                       \ rS rSrSr\R                  rSr\	" \
R                  5       5      r\S\4S j5       rS\SS4S jr\S\4S	 j5       r\S
 5       rSrg)r,      z/Dyson Pure Humidify+Cool Water Hardness Select.zmdi:water-opacityr#   c                 <    [         U R                  R                     $ )rB   )WATER_HARDNESS_ENUM_TO_STRr8   water_hardnessr:   s    r1   r<   'DysonWaterHardnessSelect.current_option   s     *$,,*E*EFFr>   r?   Nc                 H    U R                   R                  [        U   5        grA   )r8   set_water_hardnessWATER_HARDNESS_STR_TO_ENUMrE   s     r1   rF   &DysonWaterHardnessSelect.select_option   s    ''(B6(JKr>   c                     g)rI   zWater HardnessrJ   r:   s    r1   rK   !DysonWaterHardnessSelect.sub_name         r>   c                     g)rO   r   rJ   r:   s    r1   rQ   &DysonWaterHardnessSelect.sub_unique_id   r   r>   rJ   )rS   rT   rU   rV   rW   r   rX   rY   ro   rZ   r   r[   r\   r]   r^   r<   rF   rK   rQ   r_   rJ   r>   r1   r,   r,      s    9*11$J388:;MG G GLC LD L  #        r>   r,   )6rW   typingr   libdysonr   r   r   r   r   r	   r
   libdyson.constr   homeassistant.components.selectr   homeassistant.config_entriesr   homeassistant.constr   homeassistant.corer   homeassistant.helpers.entityr    r   constr   r   OFFGOODDEFAULT	SENSITIVEVERY_SENSITIVEr7   itemsrD   	DEGREE_45	DEGREE_90BREEZECUSTrc   rh   rs   rx   SOFTMEDIUMHARDr   r   r2   r)   r+   r-   r,   )keyvalues   00r1   <module>r      s        , 8 4 ) , 7  ' %6i##%5"  "@!E!E!G"!G:3EJ!G" 
 %%v%%v""H  (	   ">!C!C!E !E:3EJ!E  
 		  "2!7!7!9!9:3EJ!9  ""  "<!A!A!C!C:3EJ!C 
!
!'2!HP!	!6K 4"l "4k< 6 {L  a" s   F:5G !G*G